about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-01-12 11:31:53 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-01-17 14:34:54 -0300
commit5f3a7ebc358fdcbafcab4f1bf4067120fb519dfc (patch)
tree2596ef70bf10c88ab3e82c35c878ba8ca189aa49 /include
parentded3aeb2025c6686956eb10125aacb9a6e7c298e (diff)
downloadglibc-5f3a7ebc358fdcbafcab4f1bf4067120fb519dfc.tar.gz
glibc-5f3a7ebc358fdcbafcab4f1bf4067120fb519dfc.tar.xz
glibc-5f3a7ebc358fdcbafcab4f1bf4067120fb519dfc.zip
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 <fweimer@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/sys/epoll.h8
1 files changed, 8 insertions, 0 deletions
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