extern guint32 _wapi_fd_reserve;
extern gpointer _wapi_global_signal_handle;
extern mono_mutex_t *_wapi_global_signal_mutex;
-extern pthread_cond_t *_wapi_global_signal_cond;
+extern mono_cond_t *_wapi_global_signal_cond;
extern int _wapi_sem_id;
extern gboolean _wapi_has_shut_down;
handle_data->signalled=state;
if (broadcast == TRUE) {
- thr_ret = pthread_cond_broadcast (&handle_data->signal_cond);
+ thr_ret = mono_os_cond_broadcast (&handle_data->signal_cond);
if (thr_ret != 0)
- g_warning ("Bad call to pthread_cond_broadcast result %d for handle %p", thr_ret, handle);
+ g_warning ("Bad call to mono_os_cond_broadcast result %d for handle %p", thr_ret, handle);
g_assert (thr_ret == 0);
} else {
- thr_ret = pthread_cond_signal (&handle_data->signal_cond);
+ thr_ret = mono_os_cond_signal (&handle_data->signal_cond);
if (thr_ret != 0)
- g_warning ("Bad call to pthread_cond_signal result %d for handle %p", thr_ret, handle);
+ g_warning ("Bad call to mono_os_cond_signal result %d for handle %p", thr_ret, handle);
g_assert (thr_ret == 0);
}
/* Tell everyone blocking on multiple handles that something
* was signalled
*/
- thr_ret = pthread_cond_broadcast (_wapi_global_signal_cond);
+ thr_ret = mono_os_cond_broadcast (_wapi_global_signal_cond);
if (thr_ret != 0)
- g_warning ("Bad call to pthread_cond_broadcast result %d for handle %p", thr_ret, handle);
+ g_warning ("Bad call to mono_os_cond_broadcast result %d for handle %p", thr_ret, handle);
g_assert (thr_ret == 0);
thr_ret = mono_os_mutex_unlock (_wapi_global_signal_mutex);
/* Point to the mutex/cond inside _wapi_global_signal_handle */
mono_mutex_t *_wapi_global_signal_mutex;
-pthread_cond_t *_wapi_global_signal_cond;
+mono_cond_t *_wapi_global_signal_cond;
int _wapi_sem_id;
gboolean _wapi_has_shut_down = FALSE;
handle->signalled = FALSE;
handle->ref = 1;
- thr_ret = pthread_cond_init (&handle->signal_cond, NULL);
+ thr_ret = mono_os_cond_init (&handle->signal_cond);
g_assert (thr_ret == 0);
thr_ret = mono_os_mutex_init (&handle->signal_mutex);
static void
signal_handle_and_unref (gpointer handle)
{
- pthread_cond_t *cond;
+ mono_cond_t *cond;
mono_mutex_t *mutex;
guint32 idx;
{
guint32 idx;
int res;
- pthread_cond_t *cond;
+ mono_cond_t *cond;
mono_mutex_t *mutex;
MONO_TRACE (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: waiting for %p (type %s)", __func__, handle,