summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1995-07-08 16:36:30 +0000
committerjoerg <joerg@FreeBSD.org>1995-07-08 16:36:30 +0000
commite9baa60cfb8479f24f61b6a6098bb39e61e46426 (patch)
tree63046e5828d24fa9d3b8ed80de20abe30bae9fc6 /sys
parentfd179c3a952dff2a6d1d18fc96ca320ba8585ce8 (diff)
downloadFreeBSD-src-e9baa60cfb8479f24f61b6a6098bb39e61e46426.zip
FreeBSD-src-e9baa60cfb8479f24f61b6a6098bb39e61e46426.tar.gz
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)
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/sem.h13
-rw-r--r--sys/sys/shm.h8
2 files changed, 14 insertions, 7 deletions
diff --git a/sys/sys/sem.h b/sys/sys/sem.h
index ef08f4e..1efd4c9 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 710ad44..4053445 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 */
OpenPOWER on IntegriCloud