Update.
[glibc.git] / bits / ipc.h
blob58f419be1df3972585b6711d8e8de4abe03be38d
1 /* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If not,
17 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
20 #ifndef _SYS_IPC_H
21 # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
22 #endif
24 #include <sys/types.h>
26 /* Mode bits for `msgget', `semget', and `shmget'. */
27 #define IPC_CREAT 01000 /* create key if key does not exist */
28 #define IPC_EXCL 02000 /* fail if key exists */
29 #define IPC_NOWAIT 04000 /* return error on wait */
31 /* Control commands for `msgctl', `semctl', and `shmctl'. */
32 #define IPC_RMID 0 /* remove identifier */
33 #define IPC_SET 1 /* set `ipc_perm' options */
34 #define IPC_STAT 2 /* get `ipc_perm' options */
36 /* Special key values. */
37 #define IPC_PRIVATE ((key_t) 0) /* private key */
40 /* Data structure used to pass permission information to IPC operations. */
41 struct ipc_perm
43 __uid_t uid; /* owner's user ID */
44 __gid_t gid; /* owner's group ID */
45 __uid_t cuid; /* creator's user ID */
46 __gid_t cgid; /* creator's group ID */
47 __mode_t mode; /* read/write permission */