kernel: some boottime sanitychecks
[minix.git] / include / sys / ipc.h
blobae52b64fb9030627038ef8934e740c10c29d8323
1 /*
2 * SVID compatible ipc.h file
3 */
5 #ifndef _SYS_IPC_H_
6 #define _SYS_IPC_H_
8 #include <sys/featuretest.h>
9 #include <sys/types.h>
11 /* Data structure used to pass permission information to IPC operations. */
12 struct ipc_perm
14 key_t key; /* Key. */
15 uid_t uid; /* Owner's user ID. */
16 gid_t gid; /* Owner's group ID. */
17 uid_t cuid; /* Creator's user ID. */
18 gid_t cgid; /* Creator's group ID. */
19 unsigned short int mode; /* Reader/write permission. */
20 unsigned short int __seq; /* Sequence number. */
23 /* X/Open required constants (same values as system 5) */
24 #define IPC_CREAT 001000 /* create entry if key does not exist */
25 #define IPC_EXCL 002000 /* fail if key exists */
26 #define IPC_NOWAIT 004000 /* error if request must wait */
28 #define IPC_PRIVATE (key_t)0 /* private key */
30 #define IPC_RMID 0 /* remove identifier */
31 #define IPC_SET 1 /* set options */
32 #define IPC_STAT 2 /* get options */
34 #ifdef __minix
35 #define IPC_INFO 3 /* See ipcs. */
36 #endif /* !__minix */
39 * Macro to convert between ipc ids and array indices or sequence ids.
41 #if defined(_NETBSD_SOURCE)
42 #define IXSEQ_TO_IPCID(ix,perm) (((perm._seq) << 16) | (ix & 0xffff))
43 #endif
45 #include <sys/cdefs.h>
47 __BEGIN_DECLS
48 key_t ftok(const char *, int);
49 __END_DECLS
51 #endif /* !_SYS_IPC_H_ */