summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-05-11 06:20:15 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-05-11 06:20:15 +0000
commit4aee91bd239ff606cd15edf85e429978656492eb (patch)
treef929fd51f0f09ddd558886dbf3883df0707bc0b3
parent4074fc0c89cbd89a56a4ffac549e19e86424f168 (diff)
Move the SHM_{LOCK,UNLOCK} shmctl() commands inside _KERNEL protection; const
shmaddr pointer arguments to shmat() and shmdt(); kleink
-rw-r--r--sys/sys/shm.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/sys/shm.h b/sys/sys/shm.h
index 74c8a1772b0..fa94444bfc0 100644
--- a/sys/sys/shm.h
+++ b/sys/sys/shm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: shm.h,v 1.4 1998/02/18 04:07:19 millert Exp $ */
+/* $OpenBSD: shm.h,v 1.5 1998/05/11 06:20:14 deraadt Exp $ */
/* $NetBSD: shm.h,v 1.20 1996/04/09 20:55:35 cgd Exp $ */
/*
@@ -50,11 +50,6 @@
#define SHM_R (IPC_R)
#define SHM_W (IPC_W)
-/* Some systems (e.g. HP-UX) take these as the second (cmd) arg to shmctl(). */
-#define SHM_LOCK 3 /* Lock segment in memory. */
-#define SHM_UNLOCK 4 /* Unlock a segment locked by SHM_LOCK. */
-
-
struct shmid_ds {
struct ipc_perm shm_perm; /* operation permission structure */
int shm_segsz; /* size of segment in bytes */
@@ -69,6 +64,10 @@ struct shmid_ds {
#ifdef _KERNEL
+/* Some systems (e.g. HP-UX) take these as the second (cmd) arg to shmctl(). */
+#define SHM_LOCK 3 /* Lock segment in memory. */
+#define SHM_UNLOCK 4 /* Unlock a segment locked by SHM_LOCK. */
+
/*
* System 5 style catch-all structure for shared memory constants that
* might be of interest to user programs. Do we really want/need this?
@@ -92,9 +91,9 @@ void shmexit __P((struct proc *));
#include <sys/cdefs.h>
__BEGIN_DECLS
-void *shmat __P((int, void *, int));
+void *shmat __P((int, const void *, int));
int shmctl __P((int, int, struct shmid_ds *));
-int shmdt __P((void *));
+int shmdt __P((const void *));
int shmget __P((key_t, int, int));
__END_DECLS