1/*
2 * Copyright 2008-2012 Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef _SYS_IPC_H
6#define _SYS_IPC_H
7
8
9#include <sys/cdefs.h>
10#include <sys/types.h>
11
12
13/* Mode bits for msgget(), semget(), and shmget() */
14#define IPC_CREAT	01000	/* create key */
15#define IPC_EXCL	02000	/* fail if key exists */
16#define IPC_NOWAIT	04000	/* do not block */
17
18/* Control commands for msgctl(), semctl(), and shmctl() */
19#define IPC_RMID	0		/* remove identifier */
20#define IPC_SET		1		/* set options */
21#define IPC_STAT	2		/* get options */
22
23/* Private key */
24#define IPC_PRIVATE		(key_t)0
25
26
27struct ipc_perm {
28	key_t	key;			/* IPC identifier */
29	uid_t	uid;			/* owner's user ID */
30	gid_t	gid;			/* owner's group ID */
31	uid_t	cuid;			/* creator's user ID */
32	gid_t	cgid;			/* creator's group ID */
33	mode_t	mode;			/* Read/write permission */
34};
35
36
37__BEGIN_DECLS
38
39key_t ftok(const char *path, int id);
40
41__END_DECLS
42
43#endif	/* _SYS_IPC_H */
44