2 * w32event-win32.c: Runtime support for managed Event on Win32
5 * Ludovic Henry (luhenry@microsoft.com)
7 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
16 mono_w32event_init (void)
21 mono_w32event_create (gboolean manual
, gboolean initial
)
23 return CreateEvent (NULL
, manual
, initial
, NULL
);
27 mono_w32event_set (gpointer handle
)
33 mono_w32event_reset (gpointer handle
)
39 ves_icall_System_Threading_Events_CreateEvent_internal (MonoBoolean manual
, MonoBoolean initial
, MonoString
*name
, gint32
*error
)
43 event
= CreateEvent (NULL
, manual
, initial
, name
? mono_string_chars (name
) : NULL
);
45 *error
= GetLastError ();
51 ves_icall_System_Threading_Events_SetEvent_internal (gpointer handle
)
53 return SetEvent (handle
);
57 ves_icall_System_Threading_Events_ResetEvent_internal (gpointer handle
)
59 return ResetEvent (handle
);
63 ves_icall_System_Threading_Events_CloseEvent_internal (gpointer handle
)
69 ves_icall_System_Threading_Events_OpenEvent_internal (MonoString
*name
, gint32 rights
, gint32
*error
)
73 *error
= ERROR_SUCCESS
;
75 handle
= OpenEvent (rights
, FALSE
, mono_string_chars (name
));
77 *error
= GetLastError ();