[tools] Add nuget-hash-extractor tool to help produce the runtime ignored assemblies...
[mono-project.git] / mono / utils / mono-poll.h
blobbedef4c8863d07e38382bc92b52feb5a87392bf0
1 #ifndef MONO_POLL_H
2 #define MONO_POLL_H
4 #include <mono/utils/mono-publib.h>
6 #include <config.h>
7 #ifdef HAVE_SYS_TIME_H
8 #include <sys/time.h>
9 #endif
10 #include <sys/types.h>
11 #ifdef HAVE_UNISTD_H
12 #include <unistd.h>
13 #endif
15 #ifdef HAVE_POLL
16 #ifdef HAVE_POLL_H
17 #include <poll.h>
18 #elif defined(HAVE_SYS_POLL_H)
19 #include <sys/poll.h>
20 #endif
22 #define MONO_POLLIN POLLIN
23 #define MONO_POLLPRI POLLPRI
24 #define MONO_POLLOUT POLLOUT
25 #define MONO_POLLERR POLLERR
26 #define MONO_POLLHUP POLLHUP
27 #define MONO_POLLNVAL POLLNVAL
29 typedef struct pollfd mono_pollfd;
31 #else
33 #ifdef HOST_WIN32
34 #include <windows.h>
35 #endif
36 #define MONO_POLLIN 1
37 #define MONO_POLLPRI 2
38 #define MONO_POLLOUT 4
39 #define MONO_POLLERR 8
40 #define MONO_POLLHUP 0x10
41 #define MONO_POLLNVAL 0x20
43 typedef struct {
44 int fd;
45 short events;
46 short revents;
47 } mono_pollfd;
49 #endif
51 MONO_API int mono_poll (mono_pollfd *ufds, unsigned int nfds, int timeout);
53 #endif /* MONO_POLL_H */