about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/sys')
-rw-r--r--sysdeps/unix/sysv/linux/sys/epoll.h21
-rw-r--r--sysdeps/unix/sysv/linux/sys/eventfd.h11
-rw-r--r--sysdeps/unix/sysv/linux/sys/inotify.h15
-rw-r--r--sysdeps/unix/sysv/linux/sys/signalfd.h8
-rw-r--r--sysdeps/unix/sysv/linux/sys/timerfd.h10
5 files changed, 59 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/sys/epoll.h b/sysdeps/unix/sysv/linux/sys/epoll.h
index f4e8bda99a..aa8784b1ee 100644
--- a/sysdeps/unix/sysv/linux/sys/epoll.h
+++ b/sysdeps/unix/sysv/linux/sys/epoll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2006, 2007, 2008 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
@@ -31,6 +31,16 @@ typedef __sigset_t sigset_t;
 #endif
 
 
+/* Flags to be passed to epoll_create2.  */
+enum
+  {
+    EPOLL_CLOEXEC = 02000000,
+#define EPOLL_CLOEXEC EPOLL_CLOEXEC
+    EPOLL_NONBLOCK = 04000
+#define EPOLL_NONBLOCK EPOLL_NONBLOCK
+  };
+
+
 enum EPOLL_EVENTS
   {
     EPOLLIN = 0x001,
@@ -63,9 +73,9 @@ enum EPOLL_EVENTS
 
 
 /* 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
@@ -91,6 +101,9 @@ __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 additional FLAGS parameter.  */
+extern int epoll_create2 (int __size, 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
diff --git a/sysdeps/unix/sysv/linux/sys/eventfd.h b/sysdeps/unix/sysv/linux/sys/eventfd.h
index 1ebaea7b30..205824b669 100644
--- a/sysdeps/unix/sysv/linux/sys/eventfd.h
+++ b/sysdeps/unix/sysv/linux/sys/eventfd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2007, 2008 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
@@ -25,6 +25,15 @@
 /* Type for event counter.  */
 typedef uint64_t eventfd_t;
 
+/* Flags for signalfd.  */
+enum
+  {
+    EFD_CLOEXEC = 02000000,
+#define EFD_CLOEXEC EFD_CLOEXEC
+    EFD_NONBLOCK = 04000
+#define EFD_NONBLOCK EFD_NONBLOCK
+  };
+
 
 __BEGIN_DECLS
 
diff --git a/sysdeps/unix/sysv/linux/sys/inotify.h b/sysdeps/unix/sysv/linux/sys/inotify.h
index 0131db9d3e..81e31fb646 100644
--- a/sysdeps/unix/sysv/linux/sys/inotify.h
+++ b/sysdeps/unix/sysv/linux/sys/inotify.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006, 2008 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
@@ -22,6 +22,16 @@
 #include <stdint.h>
 
 
+/* Flags for the parameter of inotify_init1.  */
+enum
+  {
+    IN_CLOEXEC = 02000000,
+#define IN_CLOEXEC IN_CLOEXEC
+    IN_NONBLOCK = 04000
+#define IN_NONBLOCK IN_NONBLOCK
+  };
+
+
 /* Structure describing an inotify event.  */
 struct inotify_event
 {
@@ -79,6 +89,9 @@ __BEGIN_DECLS
 /* Create and initialize inotify instance.  */
 extern int inotify_init (void) __THROW;
 
+/* Create and initialize inotify instance.  */
+extern int inotify_init1 (int __flags) __THROW;
+
 /* Add watch of object NAME to inotify instance FD.  Notify about
    events specified by MASK.  */
 extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask)
diff --git a/sysdeps/unix/sysv/linux/sys/signalfd.h b/sysdeps/unix/sysv/linux/sys/signalfd.h
index 7a7f53ba32..dae71a400e 100644
--- a/sysdeps/unix/sysv/linux/sys/signalfd.h
+++ b/sysdeps/unix/sysv/linux/sys/signalfd.h
@@ -45,6 +45,14 @@ struct signalfd_siginfo
   uint8_t __pad[48];
 };
 
+/* Flags for signalfd.  */
+enum
+  {
+    SFD_CLOEXEC = 02000000,
+#define SFD_CLOEXEC SFD_CLOEXEC
+    SFD_NONBLOCK = 04000
+#define SFD_NONBLOCK SFD_NONBLOCK
+  };
 
 __BEGIN_DECLS
 
diff --git a/sysdeps/unix/sysv/linux/sys/timerfd.h b/sysdeps/unix/sysv/linux/sys/timerfd.h
index 0a4b81c9b7..c1bb06f5ff 100644
--- a/sysdeps/unix/sysv/linux/sys/timerfd.h
+++ b/sysdeps/unix/sysv/linux/sys/timerfd.h
@@ -22,6 +22,16 @@
 #include <time.h>
 
 
+/* Bits to be set in the FLAGS parameter of `timerfd_create'.  */
+enum
+  {
+    TFD_CLOEXEC = 02000000,
+#define TFD_CLOEXEC TFD_CLOEXEC
+    TFD_NONBLOCK = 04000
+#define TFD_NONBLOCK TFD_NONBLOCK
+  };
+
+
 /* Bits to be set in the FLAGS parameter of `timerfd_settime'.  */
 enum
   {