diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 0f46758e8c5a..417dc08896a8 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_exit.c 8.7 (Berkeley) 2/12/94 - * $Id: kern_exit.c,v 1.20 1995/11/11 05:49:22 bde Exp $ + * $Id: kern_exit.c,v 1.21 1995/12/07 12:46:41 davidg Exp $ */ #include @@ -136,6 +136,10 @@ exit1(p, rv) */ fdfree(p); +#ifdef SYSVSEM + semexit(p); +#endif + /* The next two chunks should probably be moved to vmspace_exit. */ vm = p->p_vmspace; #ifdef SYSVSHM diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c index 04f36eaa6321..75fb93ba9a26 100644 --- a/sys/kern/sysv_sem.c +++ b/sys/kern/sysv_sem.c @@ -1,4 +1,4 @@ -/* $Id: sysv_sem.c,v 1.11 1995/12/14 08:31:52 phk Exp $ */ +/* $Id: sysv_sem.c,v 1.12 1995/12/15 05:00:30 peter Exp $ */ /* * Implementation of SVID semaphores @@ -35,7 +35,6 @@ static struct sem_undo *semu_alloc __P((struct proc *p)); static int semundo_adjust __P((struct proc *p, struct sem_undo **supptr, int semid, int semnum, int adjval)); static void semundo_clear __P((int semid, int semnum)); -static void semexit __P((struct proc *p)); /* XXX casting to (sy_call_t *) is bogus, as usual. */ static sy_call_t *semcalls[] = { diff --git a/sys/sys/sem.h b/sys/sys/sem.h index fc41d5fe77a0..3526a16d337f 100644 --- a/sys/sys/sem.h +++ b/sys/sys/sem.h @@ -1,4 +1,4 @@ -/* $Id: sem.h,v 1.5 1995/07/29 11:42:50 bde Exp $ */ +/* $Id: sem.h,v 1.6 1995/08/30 00:33:34 bde Exp $ */ /* $NetBSD: sem.h,v 1.5 1994/06/29 06:45:15 cgd Exp $ */ /* @@ -154,6 +154,11 @@ extern int *semu; /* undo structure pool */ */ #define SEMU(ix) ((struct sem_undo *)(((long)semu)+ix * SEMUSZ)) +/* + * Process sem_undo vectors at proc exit. + */ +void semexit __P((struct proc *p)); + /* * Parameters to the semconfig system call */