Ifdefed conditionally used simplock variables.

This commit is contained in:
bde 1999-01-02 11:34:57 +00:00
parent 60b0c6afef
commit 734d13314e
12 changed files with 36 additions and 14 deletions

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)cd9660_node.c 8.2 (Berkeley) 1/23/94
* $Id: cd9660_node.c,v 1.24 1998/02/06 12:13:20 eivind Exp $
* $Id: cd9660_node.c,v 1.25 1998/02/09 06:09:18 eivind Exp $
*/
#include <sys/param.h>
@ -58,7 +58,9 @@
static struct iso_node **isohashtbl;
static u_long isohash;
#define INOHASH(device, inum) (((device) + ((inum)>>12)) & isohash)
#ifndef NULL_SIMPLELOCKS
static struct simplelock cd9660_ihash_slock;
#endif
static void cd9660_ihashrem __P((struct iso_node *));
static unsigned cd9660_chars2ui __P((unsigned char *begin, int len));

View File

@ -1,4 +1,4 @@
/* $Id: msdosfs_denode.c,v 1.42 1998/11/21 00:20:24 dt Exp $ */
/* $Id: msdosfs_denode.c,v 1.43 1998/12/07 21:58:34 archie Exp $ */
/* $NetBSD: msdosfs_denode.c,v 1.28 1998/02/10 14:10:00 mrg Exp $ */
/*-
@ -72,7 +72,9 @@ static struct denode **dehashtbl;
static u_long dehash; /* size of hash table - 1 */
#define DEHASH(dev, dcl, doff) (dehashtbl[((dev) + (dcl) + (doff) / \
sizeof(struct direntry)) & dehash])
#ifndef NULL_SIMPLELOCKS
static struct simplelock dehash_slock;
#endif
union _qcvt {
quad_t qcvt;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_ihash.c 8.7 (Berkeley) 5/17/95
* $Id: ufs_ihash.c,v 1.16 1998/02/09 06:11:10 eivind Exp $
* $Id: ufs_ihash.c,v 1.17 1998/11/10 09:16:27 peter Exp $
*/
#include <sys/param.h>
@ -53,7 +53,9 @@ static MALLOC_DEFINE(M_UFSIHASH, "UFS ihash", "UFS Inode hash tables");
static LIST_HEAD(ihashhead, inode) *ihashtbl;
static u_long ihash; /* size of hash table - 1 */
#define INOHASH(device, inum) (&ihashtbl[((device) + (inum)) & ihash])
#ifndef NULL_SIMPLELOCKS
static struct simplelock ufs_ihash_slock;
#endif
/*
* Initialize inode hash table.

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)cd9660_node.c 8.2 (Berkeley) 1/23/94
* $Id: cd9660_node.c,v 1.24 1998/02/06 12:13:20 eivind Exp $
* $Id: cd9660_node.c,v 1.25 1998/02/09 06:09:18 eivind Exp $
*/
#include <sys/param.h>
@ -58,7 +58,9 @@
static struct iso_node **isohashtbl;
static u_long isohash;
#define INOHASH(device, inum) (((device) + ((inum)>>12)) & isohash)
#ifndef NULL_SIMPLELOCKS
static struct simplelock cd9660_ihash_slock;
#endif
static void cd9660_ihashrem __P((struct iso_node *));
static unsigned cd9660_chars2ui __P((unsigned char *begin, int len));

View File

@ -26,7 +26,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: subr_rman.c,v 1.2 1998/11/23 09:33:35 bde Exp $
* $Id: subr_rman.c,v 1.3 1998/12/07 21:58:29 archie Exp $
*/
/*
@ -68,7 +68,9 @@
MALLOC_DEFINE(M_RMAN, "rman", "Resource manager");
struct rman_head rman_head;
#ifndef NULL_SIMPLELOCKS
static struct simplelock rman_lock; /* mutex to protect rman_head */
#endif
static int int_rman_activate_resource(struct rman *rm, struct resource *r,
struct resource **whohas);
static int int_rman_release_resource(struct rman *rm, struct resource *r);

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
* $Id: vfs_subr.c,v 1.176 1998/12/22 00:44:11 eivind Exp $
* $Id: vfs_subr.c,v 1.177 1998/12/24 12:07:16 bde Exp $
*/
/*
@ -107,11 +107,13 @@ SYSCTL_INT(_vfs, OID_AUTO, ioopt, CTLFLAG_RW, &vfs_ioopt, 0, "");
struct mntlist mountlist; /* mounted filesystem list */
struct simplelock mountlist_slock;
static struct simplelock mntid_slock;
struct simplelock mntvnode_slock;
int nfs_mount_type = -1;
#ifndef NULL_SIMPLELOCKS
static struct simplelock mntid_slock;
static struct simplelock vnode_free_list_slock;
static struct simplelock spechash_slock;
#endif
struct nfs_public nfs_pub; /* publicly exported FS */
static vm_zone_t vnode_zone;

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
* $Id: vfs_subr.c,v 1.176 1998/12/22 00:44:11 eivind Exp $
* $Id: vfs_subr.c,v 1.177 1998/12/24 12:07:16 bde Exp $
*/
/*
@ -107,11 +107,13 @@ SYSCTL_INT(_vfs, OID_AUTO, ioopt, CTLFLAG_RW, &vfs_ioopt, 0, "");
struct mntlist mountlist; /* mounted filesystem list */
struct simplelock mountlist_slock;
static struct simplelock mntid_slock;
struct simplelock mntvnode_slock;
int nfs_mount_type = -1;
#ifndef NULL_SIMPLELOCKS
static struct simplelock mntid_slock;
static struct simplelock vnode_free_list_slock;
static struct simplelock spechash_slock;
#endif
struct nfs_public nfs_pub; /* publicly exported FS */
static vm_zone_t vnode_zone;

View File

@ -1,4 +1,4 @@
/* $Id: msdosfs_denode.c,v 1.42 1998/11/21 00:20:24 dt Exp $ */
/* $Id: msdosfs_denode.c,v 1.43 1998/12/07 21:58:34 archie Exp $ */
/* $NetBSD: msdosfs_denode.c,v 1.28 1998/02/10 14:10:00 mrg Exp $ */
/*-
@ -72,7 +72,9 @@ static struct denode **dehashtbl;
static u_long dehash; /* size of hash table - 1 */
#define DEHASH(dev, dcl, doff) (dehashtbl[((dev) + (dcl) + (doff) / \
sizeof(struct direntry)) & dehash])
#ifndef NULL_SIMPLELOCKS
static struct simplelock dehash_slock;
#endif
union _qcvt {
quad_t qcvt;

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)lock.h 8.12 (Berkeley) 5/19/95
* $Id: lock.h,v 1.10 1997/09/21 04:24:02 dyson Exp $
* $Id: lock.h,v 1.11 1998/01/06 05:22:48 dyson Exp $
*/
#ifndef _LOCK_H_
@ -184,6 +184,7 @@ void _simple_lock __P((struct simplelock *alp, const char *, int));
void simple_lock_init __P((struct simplelock *alp));
#else /* !SIMPLELOCK_DEBUG */
#if NCPUS == 1 /* no multiprocessor locking is necessary */
#define NULL_SIMPLELOCKS
#define simple_lock_init(alp)
#define simple_lock(alp)
#define simple_lock_try(alp) (1) /* always succeeds */

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)lock.h 8.12 (Berkeley) 5/19/95
* $Id: lock.h,v 1.10 1997/09/21 04:24:02 dyson Exp $
* $Id: lock.h,v 1.11 1998/01/06 05:22:48 dyson Exp $
*/
#ifndef _LOCK_H_
@ -184,6 +184,7 @@ void _simple_lock __P((struct simplelock *alp, const char *, int));
void simple_lock_init __P((struct simplelock *alp));
#else /* !SIMPLELOCK_DEBUG */
#if NCPUS == 1 /* no multiprocessor locking is necessary */
#define NULL_SIMPLELOCKS
#define simple_lock_init(alp)
#define simple_lock(alp)
#define simple_lock_try(alp) (1) /* always succeeds */

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_ihash.c 8.7 (Berkeley) 5/17/95
* $Id: ufs_ihash.c,v 1.16 1998/02/09 06:11:10 eivind Exp $
* $Id: ufs_ihash.c,v 1.17 1998/11/10 09:16:27 peter Exp $
*/
#include <sys/param.h>
@ -53,7 +53,9 @@ static MALLOC_DEFINE(M_UFSIHASH, "UFS ihash", "UFS Inode hash tables");
static LIST_HEAD(ihashhead, inode) *ihashtbl;
static u_long ihash; /* size of hash table - 1 */
#define INOHASH(device, inum) (&ihashtbl[((device) + (inum)) & ihash])
#ifndef NULL_SIMPLELOCKS
static struct simplelock ufs_ihash_slock;
#endif
/*
* Initialize inode hash table.

View File

@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
* $Id: vm_object.c,v 1.134 1998/10/27 13:22:51 dg Exp $
* $Id: vm_object.c,v 1.135 1998/11/05 14:28:26 dg Exp $
*/
/*
@ -119,7 +119,9 @@ static void vm_object_qcollapse __P((vm_object_t object));
*/
struct object_q vm_object_list;
#ifndef NULL_SIMPLELOCKS
static struct simplelock vm_object_list_lock;
#endif
static long vm_object_count; /* count of all objects */
vm_object_t kernel_object;
vm_object_t kmem_object;