diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2001-08-12 22:50:13 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2001-08-12 22:50:13 +0000 |
commit | 34f549c27d56694f67a4c08f95b2ad06c5ec300a (patch) | |
tree | 454a10e8508f5cdd15726a02d94f3ad027445dd1 /sys/kern | |
parent | 056e67aef1baaa328c478ea41ba7dede336512e3 (diff) |
Don't allocate globals in include files, use extern declarations.
Move the actual variables into their respective .c files.
As a bonus, remove semmap which is not used.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/sysv_msg.c | 6 | ||||
-rw-r--r-- | sys/kern/sysv_sem.c | 12 | ||||
-rw-r--r-- | sys/kern/sysv_shm.c | 5 |
3 files changed, 16 insertions, 7 deletions
diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c index 70f94c2d407..fa6b0eead78 100644 --- a/sys/kern/sysv_msg.c +++ b/sys/kern/sysv_msg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysv_msg.c,v 1.10 2001/06/22 14:14:09 deraadt Exp $ */ +/* $OpenBSD: sysv_msg.c,v 1.11 2001/08/12 22:50:12 millert Exp $ */ /* $NetBSD: sysv_msg.c,v 1.19 1996/02/09 19:00:18 christos Exp $ */ /* @@ -36,6 +36,10 @@ int nfree_msgmaps; /* # of free map entries */ short free_msgmaps; /* head of linked list of free map entries */ struct msg *free_msghdrs; /* list of free msg headers */ +char *msgpool; /* MSGMAX byte long msg buffer pool */ +struct msgmap *msgmaps; /* MSGSEG msgmap structures */ +struct msg *msghdrs; /* MSGTQL msg headers */ +struct msqid_ds *msqids; /* MSGMNI msqid_ds struct's */ void msg_freehdr __P((struct msg *)); diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c index cef45295d38..36b1b0cd084 100644 --- a/sys/kern/sysv_sem.c +++ b/sys/kern/sysv_sem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysv_sem.c,v 1.5 2001/05/16 17:14:35 millert Exp $ */ +/* $OpenBSD: sysv_sem.c,v 1.6 2001/08/12 22:50:12 millert Exp $ */ /* $NetBSD: sysv_sem.c,v 1.26 1996/02/09 19:00:25 christos Exp $ */ /* @@ -20,6 +20,10 @@ #include <sys/syscallargs.h> int semtot = 0; +struct semid_ds *sema; /* semaphore id pool */ +struct sem *sem; /* semaphore pool */ +struct sem_undo *semu_list; /* list of active undo structures */ +int *semu; /* undo structure pool */ struct sem_undo *semu_alloc __P((struct proc *)); int semundo_adjust __P((struct proc *, struct sem_undo **, int, int, int)); @@ -50,7 +54,6 @@ seminit() * Allocate a new sem_undo structure for a process * (returns ptr to structure or NULL if no more room) */ - struct sem_undo * semu_alloc(p) struct proc *p; @@ -120,7 +123,6 @@ semu_alloc(p) /* * Adjust a particular entry for a particular proc */ - int semundo_adjust(p, supptr, semid, semnum, adjval) register struct proc *p; @@ -154,8 +156,8 @@ semundo_adjust(p, supptr, semid, semnum, adjval) } /* - * Look for the requested entry and adjust it (delete if adjval becomes - * 0). + * Look for the requested entry and adjust it + * (delete if adjval becomes 0). */ sunptr = &suptr->un_ent[0]; for (i = 0; i < suptr->un_cnt; i++, sunptr++) { diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 2f628635fe0..7902a10549a 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysv_shm.c,v 1.19 2001/06/27 04:49:47 art Exp $ */ +/* $OpenBSD: sysv_shm.c,v 1.20 2001/08/12 22:50:12 millert Exp $ */ /* $NetBSD: sysv_shm.c,v 1.50 1998/10/21 22:24:29 tron Exp $ */ /* @@ -49,6 +49,9 @@ #include <vm/vm.h> #include <uvm/uvm_extern.h> +struct shminfo shminfo; +struct shmid_ds *shmsegs; + struct shmid_ds *shm_find_segment_by_shmid __P((int)); /* |