2008-05-26 20:55:57 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2008, Haiku Inc. All Rights Reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _SYS_IPC_H
|
|
|
|
#define _SYS_IPC_H
|
|
|
|
|
|
|
|
|
2008-07-29 16:03:41 +04:00
|
|
|
#include <sys/cdefs.h>
|
2008-05-26 20:55:57 +04:00
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
|
|
|
|
/* Mode bits for msgget(), semget(), and shmget() */
|
|
|
|
#define IPC_CREAT 01000 /* create key */
|
|
|
|
#define IPC_EXCL 02000 /* fail if key exists */
|
|
|
|
#define IPC_NOWAIT 04000 /* do not block */
|
|
|
|
|
|
|
|
/* Control commands for msgctl(), semctl(), and shmctl() */
|
|
|
|
#define IPC_RMID 0 /* remove identifier */
|
2008-07-29 16:03:41 +04:00
|
|
|
#define IPC_SET 1 /* set options */
|
|
|
|
#define IPC_STAT 2 /* get options */
|
2008-05-26 20:55:57 +04:00
|
|
|
|
|
|
|
/* Private key */
|
2008-07-29 16:03:41 +04:00
|
|
|
#define IPC_PRIVATE (key_t)0
|
2008-05-26 20:55:57 +04:00
|
|
|
|
|
|
|
|
|
|
|
struct ipc_perm {
|
2008-07-29 16:03:41 +04:00
|
|
|
key_t key; /* IPC identifier */
|
2008-05-26 20:55:57 +04:00
|
|
|
uid_t uid; /* owner's user ID */
|
|
|
|
gid_t gid; /* owner's group ID */
|
|
|
|
uid_t cuid; /* creator's user ID */
|
|
|
|
gid_t cgid; /* creator's group ID */
|
|
|
|
mode_t mode; /* Read/write permission */
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-07-29 16:03:41 +04:00
|
|
|
__BEGIN_DECLS
|
2008-05-26 20:55:57 +04:00
|
|
|
|
|
|
|
key_t ftok(const char *path, int id);
|
|
|
|
|
2008-07-29 16:03:41 +04:00
|
|
|
__END_DECLS
|
2008-05-26 20:55:57 +04:00
|
|
|
|
|
|
|
#endif /* _SYS_IPC_H */
|