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