#include <mono/io-layer/wapi.h>
#include <mono/io-layer/wapi-private.h>
-#include <mono/io-layer/misc-private.h>
#include <mono/io-layer/handles-private.h>
-#include <mono/io-layer/mono-mutex.h>
#include <mono/io-layer/semaphore-private.h>
+#include <mono/utils/mono-once.h>
#if 0
#define DEBUG(...) g_message(__VA_ARGS__)
static void sem_ops_init (void)
{
_wapi_handle_register_capabilities (WAPI_HANDLE_SEM,
- WAPI_HANDLE_CAP_WAIT |
- WAPI_HANDLE_CAP_SIGNAL);
+ (WapiHandleCapability)(WAPI_HANDLE_CAP_WAIT | WAPI_HANDLE_CAP_SIGNAL));
_wapi_handle_register_capabilities (WAPI_HANDLE_NAMEDSEM,
- WAPI_HANDLE_CAP_WAIT |
- WAPI_HANDLE_CAP_SIGNAL);
+ (WapiHandleCapability)(WAPI_HANDLE_CAP_WAIT | WAPI_HANDLE_CAP_SIGNAL));
}
static void sema_signal(gpointer handle)
return(NULL);
}
- pthread_cleanup_push ((void(*)(void *))_wapi_handle_unlock_handle,
- handle);
thr_ret = _wapi_handle_lock_handle (handle);
g_assert (thr_ret == 0);
thr_ret = _wapi_handle_unlock_handle (handle);
g_assert (thr_ret == 0);
- pthread_cleanup_pop (0);
return(handle);
}
return(FALSE);
}
- pthread_cleanup_push ((void(*)(void *))_wapi_handle_unlock_handle,
- handle);
thr_ret = _wapi_handle_lock_handle (handle);
g_assert (thr_ret == 0);
end:
thr_ret = _wapi_handle_unlock_handle (handle);
g_assert (thr_ret == 0);
- pthread_cleanup_pop (0);
return(ret);
}