1 /* Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc. 2 3 The GNU C Library is free software; you can redistribute it and/or 4 modify it under the terms of the GNU Lesser General Public 5 License as published by the Free Software Foundation; either 6 version 2.1 of the License, or (at your option) any later version. 7 8 The GNU C Library is distributed in the hope that it will be useful, 9 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 Lesser General Public License for more details. 12 13 You should have received a copy of the GNU Lesser General Public 14 License along with the GNU C Library; if not, see 15 <http://www.gnu.org/licenses/>. */ 16 17 #ifndef _SYS_IPC_H 18 # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." 19 #endif 20 21 #include <bits/types.h> 22 23 /* Mode bits for `msgget', `semget', and `shmget'. */ 24 #define IPC_CREAT 01000 /* Create key if key does not exist. */ 25 #define IPC_EXCL 02000 /* Fail if key exists. */ 26 #define IPC_NOWAIT 04000 /* Return error on wait. */ 27 28 /* Control commands for `msgctl', `semctl', and `shmctl'. */ 29 #define IPC_RMID 0 /* Remove identifier. */ 30 #define IPC_SET 1 /* Set `ipc_perm' options. */ 31 #define IPC_STAT 2 /* Get `ipc_perm' options. */ 32 #ifdef __USE_GNU 33 # define IPC_INFO 3 /* See ipcs. */ 34 #endif 35 36 /* Special key values. */ 37 #define IPC_PRIVATE ((__key_t) 0) /* Private key. */ 38 39 40 /* Data structure used to pass permission information to IPC operations. */ 41 struct ipc_perm 42 { 43 __key_t __key; /* Key. */ 44 __uid_t uid; /* Owner's user ID. */ 45 __gid_t gid; /* Owner's group ID. */ 46 __uid_t cuid; /* Creator's user ID. */ 47 __gid_t cgid; /* Creator's group ID. */ 48 unsigned short int __pad1; 49 unsigned short int mode; /* Read/write permission. */ 50 unsigned short int __pad2; 51 unsigned short int __seq; /* Sequence number. */ 52 unsigned long long int __uclibc_unused1; 53 unsigned long long int __uclibc_unused2; 54 }; 55