support SYSVSEM and SYSVMSG

This commit is contained in:
deraadt 1994-02-26 10:30:35 +00:00
parent 2c2ca1351c
commit a7ccc4228a
1 changed files with 19 additions and 1 deletions

View File

@ -42,7 +42,7 @@
* @(#)machdep.c 8.1 (Berkeley) 6/11/93
*
* from: Header: machdep.c,v 1.41 93/05/27 04:39:05 torek Exp
* $Id: machdep.c,v 1.16 1994/02/01 06:01:47 deraadt Exp $
* $Id: machdep.c,v 1.17 1994/02/26 10:30:35 deraadt Exp $
*/
#include <sys/param.h>
@ -67,6 +67,12 @@
#ifdef SYSVSHM
#include <sys/shm.h>
#endif
#ifdef SYSVSEM
#include <sys/sem.h>
#endif
#ifdef SYSVSHM
#include <sys/shm.h>
#endif
#include <sys/exec.h>
#include <machine/autoconf.h>
@ -258,6 +264,18 @@ allocsys(v)
#ifdef SYSVSHM
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);
valloc(msghdrs, struct msg, msginfo.msgtql);
valloc(msqids, struct msqid_ds, msginfo.msgmni);
#endif
/*
* Determine how many buffers to allocate (enough to