19 #ifndef WINPR_LIBWINPR_SYNCH_POLLSET_H_
20 #define WINPR_LIBWINPR_SYNCH_POLLSET_H_
22 #include <winpr/wtypes.h>
23 #include <winpr/synch.h>
25 #include <winpr/config.h>
29 #ifdef WINPR_HAVE_POLL_H
32 #include <sys/select.h>
43 #ifdef WINPR_HAVE_POLL_H
44 struct pollfd* pollset;
45 struct pollfd staticSet[MAXIMUM_WAIT_OBJECTS];
62 BOOL pollset_init(WINPR_POLL_SET* set,
size_t nhandles);
63 void pollset_uninit(WINPR_POLL_SET* set);
64 void pollset_reset(WINPR_POLL_SET* set);
65 BOOL pollset_add(WINPR_POLL_SET* set,
int fd, ULONG mode);
66 int pollset_poll(WINPR_POLL_SET* set, DWORD dwMilliseconds);
68 BOOL pollset_isSignaled(WINPR_POLL_SET* set,
size_t idx);
69 BOOL pollset_isReadSignaled(WINPR_POLL_SET* set,
size_t idx);
70 BOOL pollset_isWriteSignaled(WINPR_POLL_SET* set,
size_t idx);