1 /* 2 * epoll.c ( Efficent event polling implementation ) 3 * Copyright (C) 2001,...,2002 Davide Libenzi 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * Davide Libenzi <davidel (at) xmailserver.org> 11 * 12 */ 13 14 #include <linux/unistd.h> 15 #include <errno.h> 16 #include "epoll.h" 17 18 #define __sys_epoll_create(size) _syscall1(int, epoll_create, int, size) 19 #define __sys_epoll_ctl(epfd, op, fd, event) _syscall4(int, epoll_ctl, \ 20 int, epfd, int, op, int, fd, struct epoll_event *, event) 21 #define __sys_epoll_wait(epfd, pevents, maxevents, timeout) _syscall4(int, epoll_wait, \ 22 int, epfd, struct epoll_event *, pevents, int, maxevents, int, timeout) 23 24 __sys_epoll_create(size) 25 26 __sys_epoll_ctl(epfd, op, fd, event) 27 28 __sys_epoll_wait(epfd, pevents, maxevents, timeout) 29