From 64572a51b051dc71ec12020c7a8fdae95d6cb69e Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Tue, 22 Mar 2011 01:02:10 +0100 Subject: add epoll_pwait() Change const to __const while at it. Signed-off-by: Peter S. Mazinger Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/common/epoll.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) (limited to 'libc/sysdeps/linux/common/epoll.c') diff --git a/libc/sysdeps/linux/common/epoll.c b/libc/sysdeps/linux/common/epoll.c index ab3e73bb7..b8a0c1514 100644 --- a/libc/sysdeps/linux/common/epoll.c +++ b/libc/sysdeps/linux/common/epoll.c @@ -1,6 +1,6 @@ /* vi: set sw=4 ts=4: */ /* - * epoll_create() / epoll_ctl() / epoll_wait() for uClibc + * epoll_create() / epoll_ctl() / epoll_wait() / epoll_pwait() for uClibc * * Copyright (C) 2000-2006 Erik Andersen * @@ -15,30 +15,18 @@ # define SINGLE_THREAD_P 1 #endif -/* - * epoll_create() - */ #ifdef __NR_epoll_create _syscall1(int, epoll_create, int, size) #endif -/* - * epoll_create1() - */ #ifdef __NR_epoll_create1 _syscall1(int, epoll_create1, int, flags) #endif -/* - * epoll_ctl() - */ #ifdef __NR_epoll_ctl -_syscall4(int,epoll_ctl, int, epfd, int, op, int, fd, struct epoll_event *, event) +_syscall4(int, epoll_ctl, int, epfd, int, op, int, fd, struct epoll_event *, event) #endif -/* - * epoll_wait() - */ #ifdef __NR_epoll_wait extern __typeof(epoll_wait) __libc_epoll_wait; int __libc_epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout) @@ -57,15 +45,12 @@ int __libc_epoll_wait(int epfd, struct epoll_event *events, int maxevents, int t weak_alias(__libc_epoll_wait, epoll_wait) #endif -/* - * epoll_pwait() - */ #ifdef __NR_epoll_pwait # include extern __typeof(epoll_pwait) __libc_epoll_pwait; int __libc_epoll_pwait(int epfd, struct epoll_event *events, int maxevents, - int timeout, const sigset_t *set) + int timeout, __const sigset_t *set) { int nsig = _NSIG / 8; if (SINGLE_THREAD_P) @@ -81,3 +66,9 @@ int __libc_epoll_pwait(int epfd, struct epoll_event *events, int maxevents, } weak_alias(__libc_epoll_pwait, epoll_pwait) #endif + +#ifdef __NR_epoll_pwait +_syscall5(int, epoll_pwait, int, epfd, struct epoll_event *, events, int, maxevents, int, timeout, + __const sigset_t *, ss) +/* TODO: add cancellation for epoll_pwait */ +#endif -- cgit v1.2.3