]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/unix/sysv/linux/sys/epoll.h
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / sys / epoll.h
index f4e8bda99a96cbfb060af67237632d03e7c34ede..72ec211b9560f79bac9740f161ea95dfd693fbcb 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -12,9 +12,8 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 #ifndef        _SYS_EPOLL_H
 #define        _SYS_EPOLL_H    1
 typedef __sigset_t sigset_t;
 #endif
 
+/* Get the platform-dependent flags.  */
+#include <bits/epoll.h>
+
+#ifndef __EPOLL_PACKED
+# define __EPOLL_PACKED
+#endif
+
 
 enum EPOLL_EVENTS
   {
@@ -55,17 +61,19 @@ enum EPOLL_EVENTS
 #define EPOLLHUP EPOLLHUP
     EPOLLRDHUP = 0x2000,
 #define EPOLLRDHUP EPOLLRDHUP
-    EPOLLONESHOT = (1 << 30),
+    EPOLLWAKEUP = 1u << 29,
+#define EPOLLWAKEUP EPOLLWAKEUP
+    EPOLLONESHOT = 1u << 30,
 #define EPOLLONESHOT EPOLLONESHOT
-    EPOLLET = (1 << 31)
+    EPOLLET = 1u << 31
 #define EPOLLET EPOLLET
   };
 
 
 /* Valid opcodes ( "op" parameter ) to issue to epoll_ctl().  */
-#define EPOLL_CTL_ADD 1        /* Add a file decriptor to the interface.  */
-#define EPOLL_CTL_DEL 2        /* Remove a file decriptor from the interface.  */
-#define EPOLL_CTL_MOD 3        /* Change file decriptor epoll_event structure.  */
+#define EPOLL_CTL_ADD 1        /* Add a file descriptor to the interface.  */
+#define EPOLL_CTL_DEL 2        /* Remove a file descriptor from the interface.  */
+#define EPOLL_CTL_MOD 3        /* Change file descriptor epoll_event structure.  */
 
 
 typedef union epoll_data
@@ -80,7 +88,7 @@ struct epoll_event
 {
   uint32_t events;     /* Epoll events */
   epoll_data_t data;   /* User data variable */
-};
+} __EPOLL_PACKED;
 
 
 __BEGIN_DECLS
@@ -91,6 +99,10 @@ __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
+   parameter has been dropped.  */
+extern int epoll_create1 (int __flags) __THROW;
+
 
 /* Manipulate an epoll instance "epfd". Returns 0 in case of success,
    -1 in case of error ( the "errno" variable will contain the
@@ -123,7 +135,7 @@ extern int epoll_wait (int __epfd, struct epoll_event *__events,
    __THROW.  */
 extern int epoll_pwait (int __epfd, struct epoll_event *__events,
                        int __maxevents, int __timeout,
-                       __const __sigset_t *__ss);
+                       const __sigset_t *__ss);
 
 __END_DECLS