From aed5ecb7bf282a6e02c71c9dd4b06d7d470d51ec Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Sat, 8 Jul 1995 16:36:30 +0000 Subject: [PATCH] Several constants have been missing in the SysV IPC header files that are recommended by the literature. Fixes PR# misc/575: constants in sys/sem.h... Submitted by: daveho@infocom.com (Dave Hovemeyer) --- sys/sys/sem.h | 13 +++++++------ sys/sys/shm.h | 8 +++++++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/sys/sys/sem.h b/sys/sys/sem.h index ef08f4e25ed2..1efd4c926b54 100644 --- a/sys/sys/sem.h +++ b/sys/sys/sem.h @@ -1,4 +1,4 @@ -/* $Id: sem.h,v 1.2 1994/09/17 13:24:28 davidg Exp $ */ +/* $Id: sem.h,v 1.3 1995/03/28 07:57:35 bde Exp $ */ /* $NetBSD: sem.h,v 1.5 1994/06/29 06:45:15 cgd Exp $ */ /* @@ -64,6 +64,12 @@ union semun { #define SETVAL 8 /* Set the value of semval to arg.val {ALTER} */ #define SETALL 9 /* Set semvals from arg.array {ALTER} */ +/* + * Permissions + */ +#define SEM_A 0200 /* alter permission */ +#define SEM_R 0400 /* read permission */ + #ifdef KERNEL /* * Kernel implementation stuff @@ -71,11 +77,6 @@ union semun { #define SEMVMX 32767 /* semaphore maximum value */ #define SEMAEM 16384 /* adjust on exit max value */ -/* - * Permissions - */ -#define SEM_A 0200 /* alter permission */ -#define SEM_R 0400 /* read permission */ /* * Undo structure (one per process) diff --git a/sys/sys/shm.h b/sys/sys/shm.h index 710ad4475dca..40534450b4dd 100644 --- a/sys/sys/shm.h +++ b/sys/sys/shm.h @@ -1,4 +1,4 @@ -/* $Id: shm.h,v 1.2 1994/09/17 13:24:29 davidg Exp $ */ +/* $Id: shm.h,v 1.3 1994/10/02 17:24:54 phk Exp $ */ /* $NetBSD: shm.h,v 1.15 1994/06/29 06:45:17 cgd Exp $ */ /* @@ -45,6 +45,12 @@ #define SHM_RND 020000 /* Round attach address to SHMLBA */ #define SHMLBA CLBYTES /* Segment low boundry address multiple */ +/* "official" access mode definitions; somewhat braindead since you have + to specify (SHM_* >> 3) for group and (SHM_* >> 6) for world permissions */ +#define SHM_R (IPC_R) +#define SHM_W (IPC_W) + + struct shmid_ds { struct ipc_perm shm_perm; /* operation permission structure */ int shm_segsz; /* size of segment in bytes */