Call semexit() from exit(), in order to process `undo vectors'.

This function has actually never been called.
This commit is contained in:
joerg 1995-12-27 15:25:30 +00:00
parent 67c492e4c6
commit 93a2bf7703
3 changed files with 12 additions and 4 deletions

View File

@ -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 <sys/param.h>
@ -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

View File

@ -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[] = {

View File

@ -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
*/