vfs: check userland buffers before reading them.
[haiku.git] / headers / posix / sys / ipc.h
blob90ed41ef8728d4cbd8bc50cbe48580b5a73f05bb
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
9 #include <sys/cdefs.h>
10 #include <sys/types.h>
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 */
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 */
23 /* Private key */
24 #define IPC_PRIVATE (key_t)0
27 struct 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 */
37 __BEGIN_DECLS
39 key_t ftok(const char *path, int id);
41 __END_DECLS
43 #endif /* _SYS_IPC_H */