Alfred Agrell (@Alcaro) commented about server/fd.c:
}
}
+/* dispatch to the highest resolution epoll available */ +static inline int do_epoll_wait( struct epoll_event *events, int maxevents, const struct timespec *timeout_ts, int timeout_ms ) +{
- static BOOL have_pwait2 = TRUE;
- if (have_pwait2)
- {
int ret;
ret = syscall( 441 /* __NR_epoll_pwait2 */, epoll_fd, events, maxevents, timeout_ts, NULL, sizeof(unsigned long) );
__NR_epoll_pwait2 is 441 on most archs, but it's not guaranteed; there are a few cases (like x32 abi) where syscalls don't start from zero at all.
I'm not sure if Wine supports any such archs or ABIs, but it's worth checking, at least.
That last arg should be sizeof(sigset_t), but I don't think it matters if the actual signal set is null.
I have no opinion on your approach vs mine; mine's a little simpler, but yours is more comprehensive. I'm fine with both.