diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2011-03-22 01:02:10 +0100 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2012-06-15 14:00:31 +0200 |
commit | 64572a51b051dc71ec12020c7a8fdae95d6cb69e (patch) | |
tree | 77203043c9c274a5f769dbe78b31c75a58f900e3 /libc/sysdeps/linux/common | |
parent | df87a0f21e673bd4d79b174a39d8a72d5cac37ef (diff) |
add epoll_pwait()
Change const to __const while at it.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r-- | libc/sysdeps/linux/common/epoll.c | 27 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/sys/epoll.h | 3 |
2 files changed, 10 insertions, 20 deletions
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 <andersen@uclibc.org> * @@ -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 <signal.h> 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 diff --git a/libc/sysdeps/linux/common/sys/epoll.h b/libc/sysdeps/linux/common/sys/epoll.h index a55ebad62..5551bed0d 100644 --- a/libc/sysdeps/linux/common/sys/epoll.h +++ b/libc/sysdeps/linux/common/sys/epoll.h @@ -36,7 +36,6 @@ typedef __sigset_t sigset_t; # define __EPOLL_PACKED #endif - enum EPOLL_EVENTS { EPOLLIN = 0x001, @@ -97,7 +96,7 @@ __BEGIN_DECLS returned by epoll_create() should be closed with close(). */ extern int epoll_create (int __size) __THROW; -/* Same as epoll_create but with an FLAGS parameter. The unused SIZE +/* Same as epoll_create but with a FLAGS parameter. The unused SIZE parameter has been dropped. */ extern int epoll_create1 (int __flags) __THROW; |