summaryrefslogtreecommitdiff
path: root/sys/arch/mac68k
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-12-17 23:11:33 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-12-17 23:11:33 +0000
commit25ea8c8a69576ca14e0d418bcc7d03b82db24db2 (patch)
treed9af0722d8761b2c04ddf3def6874033dfd44219 /sys/arch/mac68k
parenta6dcb6be4019c0f02edd62f13fbb5737a42598aa (diff)
Make SysV-style shared memory and semaphore limits sysctl'able.
Instead of allocating a static amount of memory for the data structures via valloc() in allocsys(), allocate things dynamically using pool(9) when possible and malloc(9) when not. The various members of struct seminfo and struct shminfo are in kern.seminfo and kern.shminfo respectively (not all members of kern.seminfo are changable). The data structures used still leave something to be desired but things are not made worse in that respect by this commit.
Diffstat (limited to 'sys/arch/mac68k')
-rw-r--r--sys/arch/mac68k/mac68k/machdep.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c
index d3a78aab825..c670ae8731f 100644
--- a/sys/arch/mac68k/mac68k/machdep.c
+++ b/sys/arch/mac68k/mac68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.100 2002/04/29 23:43:03 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.101 2002/12/17 23:11:32 millert Exp $ */
/* $NetBSD: machdep.c,v 1.207 1998/07/08 04:39:34 thorpej Exp $ */
/*
@@ -103,12 +103,6 @@
#ifdef SYSVMSG
#include <sys/msg.h>
#endif
-#ifdef SYSVSEM
-#include <sys/sem.h>
-#endif
-#ifdef SYSVSHM
-#include <sys/shm.h>
-#endif
#include <machine/db_machdep.h>
#include <ddb/db_sym.h>
@@ -478,18 +472,6 @@ allocsys(v)
#define valloclim(name, type, num, lim) \
(name) = (type *)v; v = (caddr_t)((lim) = ((name)+(num)))
-#ifdef SYSVSHM
- shminfo.shmmax = shmmaxpgs;
- shminfo.shmall = shmmaxpgs;
- shminfo.shmseg = shmseg;
- valloc(shmsegs, struct shmid_ds, shminfo.shmmni);
-#endif
-#ifdef SYSVSEM
- valloc(sema, struct semid_ds, seminfo.semmni);
- valloc(sem, struct sem, seminfo.semmns);
- /* This is pretty disgusting! */
- valloc(semu, int, (seminfo.semmnu * seminfo.semusz) / sizeof(int));
-#endif
#ifdef SYSVMSG
valloc(msgpool, char, msginfo.msgmax);
valloc(msgmaps, struct msgmap, msginfo.msgseg);