FreeRDP
winpr/libwinpr/synch/event.h
1 
19 #ifndef WINPR_LIBWINPR_SYNCH_EVENT_H_
20 #define WINPR_LIBWINPR_SYNCH_EVENT_H_
21 
22 #include "../handle/handle.h"
23 
24 #include <winpr/config.h>
25 
26 #ifdef WINPR_HAVE_SYS_EVENTFD_H
27 #include <sys/eventfd.h>
28 #endif
29 
31 {
32  int fds[2];
33 };
34 
35 typedef struct winpr_event_impl WINPR_EVENT_IMPL;
36 
38 {
39  WINPR_HANDLE common;
40 
41  WINPR_EVENT_IMPL impl;
42  BOOL bAttached;
43  BOOL bManualReset;
44  char* name;
45 #if defined(WITH_DEBUG_EVENTS)
46  void* create_stack;
47 #endif
48 };
49 typedef struct winpr_event WINPR_EVENT;
50 
51 BOOL winpr_event_init(WINPR_EVENT_IMPL* event);
52 void winpr_event_init_from_fd(WINPR_EVENT_IMPL* event, int fd);
53 BOOL winpr_event_set(WINPR_EVENT_IMPL* event);
54 BOOL winpr_event_reset(WINPR_EVENT_IMPL* event);
55 void winpr_event_uninit(WINPR_EVENT_IMPL* event);
56 
57 #endif /* WINPR_LIBWINPR_SYNCH_EVENT_H_ */