From 5f3a7ebc358fdcbafcab4f1bf4067120fb519dfc Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Wed, 12 Jan 2022 11:31:53 -0300 Subject: Linux: Add epoll_pwait2 (BZ #27359) It is similar to epoll_wait, with the difference the timeout has nanosecond resoluting by using struct timespec instead of int. Although Linux interface only provides 64 bit time_t support, old 32 bit interface is also provided (so keep in sync with current practice and to no force opt-in on 64 bit time_t). Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Florian Weimer --- include/sys/epoll.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/sys') diff --git a/include/sys/epoll.h b/include/sys/epoll.h index 86e0a54e62..8049381a26 100644 --- a/include/sys/epoll.h +++ b/include/sys/epoll.h @@ -4,6 +4,14 @@ # ifndef _ISOMAC libc_hidden_proto (epoll_pwait) +#if __TIMESIZE == 64 +# define __epoll_pwait2_time64 epoll_pwait2 +#else +extern int __epoll_pwait2_time64 (int fd, struct epoll_event *ev, int maxev, + const struct __timespec64 *tmo, + const sigset_t *s); +libc_hidden_proto (__epoll_pwait2_time64) +#endif # endif /* !_ISOMAC */ #endif -- cgit v1.2.3