]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/unix/sysv/linux/bits/shm.h
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / bits / shm.h
index 639c1263141d920165fe724e02660ad365451c5e..b4cd8013d32a916afe3cda62bc4b37a17fea2996 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1997,2000,2002,2004 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2015 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_SHM_H
 # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
@@ -30,6 +29,7 @@
 #define SHM_RDONLY     010000          /* attach read-only else read-write */
 #define SHM_RND                020000          /* round attach address to SHMLBA */
 #define SHM_REMAP      040000          /* take-over region on attach */
+#define SHM_EXEC       0100000         /* execution access */
 
 /* Commands for `shmctl'.  */
 #define SHM_LOCK       11              /* lock segment (root only) */
@@ -45,22 +45,22 @@ extern int __getpagesize (void) __THROW __attribute__ ((__const__));
 /* Type to count number of attaches.  */
 typedef unsigned long int shmatt_t;
 
-/* Data structure describing a set of semaphores.  */
+/* Data structure describing a shared memory segment.  */
 struct shmid_ds
   {
     struct ipc_perm shm_perm;          /* operation permission struct */
     size_t shm_segsz;                  /* size of segment in bytes */
     __time_t shm_atime;                        /* time of last shmat() */
-    unsigned long int __unused1;
+    unsigned long int __glibc_reserved1;
     __time_t shm_dtime;                        /* time of last shmdt() */
-    unsigned long int __unused2;
+    unsigned long int __glibc_reserved2;
     __time_t shm_ctime;                        /* time of last change by shmctl() */
-    unsigned long int __unused3;
+    unsigned long int __glibc_reserved3;
     __pid_t shm_cpid;                  /* pid of creator */
     __pid_t shm_lpid;                  /* pid of last shmop */
     shmatt_t shm_nattch;               /* number of current attaches */
-    unsigned long int __unused4;
-    unsigned long int __unused5;
+    unsigned long int __glibc_reserved4;
+    unsigned long int __glibc_reserved5;
   };
 
 #ifdef __USE_MISC
@@ -73,6 +73,7 @@ struct shmid_ds
 # define SHM_DEST      01000   /* segment will be destroyed on last detach */
 # define SHM_LOCKED    02000   /* segment will not be swapped */
 # define SHM_HUGETLB   04000   /* segment is mapped via hugetlb */
+# define SHM_NORESERVE 010000  /* don't check for reservations */
 
 struct shminfo
   {
@@ -81,10 +82,10 @@ struct      shminfo
     unsigned long int shmmni;
     unsigned long int shmseg;
     unsigned long int shmall;
-    unsigned long int __unused1;
-    unsigned long int __unused2;
-    unsigned long int __unused3;
-    unsigned long int __unused4;
+    unsigned long int __glibc_reserved1;
+    unsigned long int __glibc_reserved2;
+    unsigned long int __glibc_reserved3;
+    unsigned long int __glibc_reserved4;
   };
 
 struct shm_info
@@ -97,6 +98,6 @@ struct shm_info
     unsigned long int swap_successes;
   };
 
-__END_DECLS
-
 #endif /* __USE_MISC */
+
+__END_DECLS