sysv_sem.c (088f73968c17d27568752b7ecc23e14551297d9a) | sysv_sem.c (4590fd3a2a5539b8a1ce2ad488707123c8b7c8c8) |
---|---|
1/* $Id: sysv_sem.c,v 1.7 1995/08/28 09:18:47 julian Exp $ */ | 1/* $Id: sysv_sem.c,v 1.8 1995/08/30 00:33:01 bde Exp $ */ |
2 3/* 4 * Implementation of SVID semaphores 5 * 6 * Author: Daniel Boulet 7 * 8 * This software is provided ``AS IS'' without any warranties of any kind. 9 */ 10 11#include <sys/param.h> 12#include <sys/systm.h> 13#include <sys/kernel.h> 14#include <sys/proc.h> 15#include <sys/sem.h> 16#include <sys/malloc.h> 17 | 2 3/* 4 * Implementation of SVID semaphores 5 * 6 * Author: Daniel Boulet 7 * 8 * This software is provided ``AS IS'' without any warranties of any kind. 9 */ 10 11#include <sys/param.h> 12#include <sys/systm.h> 13#include <sys/kernel.h> 14#include <sys/proc.h> 15#include <sys/sem.h> 16#include <sys/malloc.h> 17 |
18static void seminit __P((caddr_t)); | 18static void seminit __P((void *)); |
19SYSINIT(sysv_sem, SI_SUB_SYSV_SEM, SI_ORDER_FIRST, seminit, NULL) 20 21static int semctl(), semget(), semop(), semconfig(); 22int (*semcalls[])() = { semctl, semget, semop, semconfig }; 23int semtot = 0; 24struct semid_ds *sema; /* semaphore id pool */ 25struct sem *sem; /* semaphore pool */ 26struct map *semmap; /* semaphore allocation map */ 27struct sem_undo *semu_list; /* list of active undo structures */ 28int *semu; /* undo structure pool */ 29 30static struct proc *semlock_holder = NULL; 31 32void 33seminit(udata) | 19SYSINIT(sysv_sem, SI_SUB_SYSV_SEM, SI_ORDER_FIRST, seminit, NULL) 20 21static int semctl(), semget(), semop(), semconfig(); 22int (*semcalls[])() = { semctl, semget, semop, semconfig }; 23int semtot = 0; 24struct semid_ds *sema; /* semaphore id pool */ 25struct sem *sem; /* semaphore pool */ 26struct map *semmap; /* semaphore allocation map */ 27struct sem_undo *semu_list; /* list of active undo structures */ 28int *semu; /* undo structure pool */ 29 30static struct proc *semlock_holder = NULL; 31 32void 33seminit(udata) |
34 caddr_t udata; | 34 void *udata; |
35{ 36 register int i; 37 38 if (sema == NULL) 39 panic("sema is NULL"); 40 if (semu == NULL) 41 panic("semu is NULL"); 42 --- 907 unchanged lines hidden --- | 35{ 36 register int i; 37 38 if (sema == NULL) 39 panic("sema is NULL"); 40 if (semu == NULL) 41 panic("semu is NULL"); 42 --- 907 unchanged lines hidden --- |