Add lock count fields to proc structure. Always define NCPU to 1 for now
in lock.h
This commit is contained in:
parent
48ad000318
commit
eb5b4ac910
@ -1,3 +1,5 @@
|
||||
/* $NetBSD: lock.h,v 1.2 1997/07/06 12:32:38 fvdl Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@ -40,6 +42,16 @@
|
||||
#ifndef _LOCK_H_
|
||||
#define _LOCK_H_
|
||||
|
||||
#define NCPUS 1 /* XXX */
|
||||
|
||||
/*
|
||||
* Placeholder for simple lock structure until spinlocks are
|
||||
* really used an machine-dependently defined.
|
||||
*/
|
||||
struct simplelock {
|
||||
int lock_data;
|
||||
};
|
||||
|
||||
/*
|
||||
* The general lock structure. Provides for multiple shared locks,
|
||||
* upgrading from shared to exclusive, and sleeping until the lock
|
||||
@ -159,6 +171,7 @@ void lockinit __P((struct lock *, int prio, char *wmesg, int timo,
|
||||
int lockmgr __P((__volatile struct lock *, u_int flags,
|
||||
struct simplelock *, struct proc *p));
|
||||
int lockstatus __P((struct lock *));
|
||||
void lockmgr_printinfo __P((struct lock *));
|
||||
|
||||
#ifdef DEBUG
|
||||
void _simple_unlock __P((__volatile struct simplelock *alp, const char *, int));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: proc.h,v 1.49 1997/04/28 04:49:35 mycroft Exp $ */
|
||||
/* $NetBSD: proc.h,v 1.50 1997/07/06 12:32:39 fvdl Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1986, 1989, 1991, 1993
|
||||
@ -161,6 +161,9 @@ struct proc {
|
||||
|
||||
struct vnode *p_textvp; /* Vnode of executable. */
|
||||
|
||||
short p_locks; /* DEBUG: lockmgr count of held locks */
|
||||
short p_simple_locks; /* DEBUG: count of held simple locks */
|
||||
|
||||
int p_holdcnt; /* If non-zero, don't swap. */
|
||||
struct emul *p_emul; /* Emulation information */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user