[System] Use GZipStream from corefx
[mono-project.git] / mono / utils / os-event.h
blobc3ca11b8504aa536845b6bca07fbe74a31e5ff9d
2 #ifndef _MONO_UTILS_OS_EVENT_H_
3 #define _MONO_UTILS_OS_EVENT_H_
5 #include <config.h>
6 #include <glib.h>
8 #include "mono-os-mutex.h"
10 #ifndef MONO_INFINITE_WAIT
11 #define MONO_INFINITE_WAIT ((guint32) 0xFFFFFFFF)
12 #endif
14 #define MONO_OS_EVENT_WAIT_MAXIMUM_OBJECTS 64
16 typedef enum {
17 MONO_OS_EVENT_WAIT_RET_SUCCESS_0 = 0,
18 MONO_OS_EVENT_WAIT_RET_ALERTED = -1,
19 MONO_OS_EVENT_WAIT_RET_TIMEOUT = -2,
20 } MonoOSEventWaitRet;
22 typedef struct _MonoOSEvent MonoOSEvent;
24 typedef void (*MonoOSEventFreeCb) (MonoOSEvent*);
26 struct _MonoOSEvent {
27 #ifdef HOST_WIN32
28 gpointer handle;
29 #else
30 GPtrArray *conds;
31 gboolean signalled;
32 #endif
35 void
36 mono_os_event_init (MonoOSEvent *event, gboolean initial);
38 void
39 mono_os_event_destroy (MonoOSEvent *event);
41 void
42 mono_os_event_set (MonoOSEvent *event);
44 void
45 mono_os_event_reset (MonoOSEvent *event);
47 MonoOSEventWaitRet
48 mono_os_event_wait_one (MonoOSEvent *event, guint32 timeout);
50 MonoOSEventWaitRet
51 mono_os_event_wait_multiple (MonoOSEvent **events, gsize nevents, gboolean waitall, guint32 timeout);
53 #endif /* _MONO_UTILS_OS_EVENT_H_ */