diff options
author | bde <bde@FreeBSD.org> | 1999-01-02 11:34:57 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1999-01-02 11:34:57 +0000 |
commit | 734d13314e6e9f235abcba66a420f81b29606173 (patch) | |
tree | a59d3d6af3585db9166b59563c58b540faccaa4d /sys | |
parent | 60b0c6afef485cb129b9755b9ca0fc373c700689 (diff) | |
download | FreeBSD-src-734d13314e6e9f235abcba66a420f81b29606173.zip FreeBSD-src-734d13314e6e9f235abcba66a420f81b29606173.tar.gz |
Ifdefed conditionally used simplock variables.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/fs/cd9660/cd9660_node.c | 4 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_denode.c | 4 | ||||
-rw-r--r-- | sys/gnu/ext2fs/ext2_ihash.c | 4 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_node.c | 4 | ||||
-rw-r--r-- | sys/kern/subr_rman.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_export.c | 6 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 6 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_denode.c | 4 | ||||
-rw-r--r-- | sys/sys/lock.h | 3 | ||||
-rw-r--r-- | sys/sys/lockmgr.h | 3 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_ihash.c | 4 | ||||
-rw-r--r-- | sys/vm/vm_object.c | 4 |
12 files changed, 36 insertions, 14 deletions
diff --git a/sys/fs/cd9660/cd9660_node.c b/sys/fs/cd9660/cd9660_node.c index a7a971b..edfd66c 100644 --- a/sys/fs/cd9660/cd9660_node.c +++ b/sys/fs/cd9660/cd9660_node.c @@ -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)); diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c index ac18e01..74be5c4 100644 --- a/sys/fs/msdosfs/msdosfs_denode.c +++ b/sys/fs/msdosfs/msdosfs_denode.c @@ -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; diff --git a/sys/gnu/ext2fs/ext2_ihash.c b/sys/gnu/ext2fs/ext2_ihash.c index 9e0b5e4..853c739 100644 --- a/sys/gnu/ext2fs/ext2_ihash.c +++ b/sys/gnu/ext2fs/ext2_ihash.c @@ -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. diff --git a/sys/isofs/cd9660/cd9660_node.c b/sys/isofs/cd9660/cd9660_node.c index a7a971b..edfd66c 100644 --- a/sys/isofs/cd9660/cd9660_node.c +++ b/sys/isofs/cd9660/cd9660_node.c @@ -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)); diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index ddf576c..e0526bb 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -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); diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 2be30f2..f8bc7f7 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -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; diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 2be30f2..f8bc7f7 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -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; diff --git a/sys/msdosfs/msdosfs_denode.c b/sys/msdosfs/msdosfs_denode.c index ac18e01..74be5c4 100644 --- a/sys/msdosfs/msdosfs_denode.c +++ b/sys/msdosfs/msdosfs_denode.c @@ -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; diff --git a/sys/sys/lock.h b/sys/sys/lock.h index 18a9edd..592a705 100644 --- a/sys/sys/lock.h +++ b/sys/sys/lock.h @@ -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 */ diff --git a/sys/sys/lockmgr.h b/sys/sys/lockmgr.h index 18a9edd..592a705 100644 --- a/sys/sys/lockmgr.h +++ b/sys/sys/lockmgr.h @@ -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 */ diff --git a/sys/ufs/ufs/ufs_ihash.c b/sys/ufs/ufs/ufs_ihash.c index 9e0b5e4..853c739 100644 --- a/sys/ufs/ufs/ufs_ihash.c +++ b/sys/ufs/ufs/ufs_ihash.c @@ -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. diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 1ea7978..a79bb1b 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -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; |