47ca7595ca
by myself: * renamed xsi_do_undo() to xsi_sem_undo() (there is more to XSI than sems). * Fixed coding style issues in sys/sem.h and xsi_sem.cpp. * Added _kern_*() syscall prototypes to syscalls.h. * Added a TODO in xsi_sem.cpp and xsi_semaphore.h about moving union semun to a shared header. * Made the team::xsi_sem_undo_requests int32 - due to padding, it would have needed 4 bytes anyway; please always use specific types over int/short/long. * xsi_sem_undo() now checks if it needs to do anything - the calls in team.cpp no longer needs to do this. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26676 a95241bf-73f2-0310-859d-f6bbb57e9c96
44 lines
960 B
C
44 lines
960 B
C
/*
|
|
* Copyright 2008, Haiku Inc. All Rights Reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _SYS_IPC_H
|
|
#define _SYS_IPC_H
|
|
|
|
|
|
#include <sys/cdefs.h>
|
|
#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 */
|
|
#define IPC_SET 1 /* set options */
|
|
#define IPC_STAT 2 /* get options */
|
|
|
|
/* Private key */
|
|
#define IPC_PRIVATE (key_t)0
|
|
|
|
|
|
struct ipc_perm {
|
|
key_t key; /* IPC identifier */
|
|
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 */
|
|
};
|
|
|
|
|
|
__BEGIN_DECLS
|
|
|
|
key_t ftok(const char *path, int id);
|
|
|
|
__END_DECLS
|
|
|
|
#endif /* _SYS_IPC_H */
|