Commit Graph

6 Commits

Author SHA1 Message Date
Szabolcs Nagy 29f3202b73 sys/epoll.h: add EPOLLNVAL from linux v4.16
added to uapi in commit 65aaf87b3aa2d049c6b9fd85221858a895df3393
used since commit a9a08845e9acbd224e4ee466f5c1275ed50054e8,
which renamed POLL* to EPOLL* in the kernel.
2018-06-19 13:25:16 -04:00
Szabolcs Nagy b10ca0f560 add EPOLLEXCLUSIVE epoll flag from linux v4.5
new flag for exclusive wakeup mode when an event source fd is attached
to multiple epoll fds but they should not all receive the events.
new in linux commit df0108c5da561c66c333bb46bfe3c1fc65905898
2016-03-19 11:31:19 -04:00
Rich Felker 08514d0614 fix epoll structure alignment on non-x86_64 archs
this fix is far from ideal and breaks the rule of not using
arch-specific #ifdefs, but for now we just need a solution to the
existing breakage.

the underlying problem is that the kernel folks made a very stupid
decision to make misalignment of this struct part of the kernel
API/ABI for x86_64, in order to avoid writing a few extra lines of
code to handle both 32- and 64-bit userspace on 64-bit kernels. I had
just added the packed attribute unconditionally thinking it was
harmless on 32-bit archs, but non-x86 32-bit archs have 8-byte
alignment on 64-bit types.
2013-03-06 23:57:39 -05:00
Szabolcs Nagy ada88f6178 add EPOLLWAKEUP flag to sys/epoll.h 2013-01-12 19:42:39 +01:00
Rich Felker 761ebe065c align EPOLL_* flags with fcntl O_* flag definitions, which vary by arch
the old definitions were wrong on some archs. actually, EPOLL_NONBLOCK
probably should not even be defined; it is not accepted by the kernel
and it's not clear to me whether it has any use at all, even if it did
work. this issue should be revisited at some point, but I'm leaving it
in place for now in case some applications reference it.
2012-12-27 20:44:44 -05:00
Rich Felker 0b44a0315b initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00