diff options
author | 2007-05-29 00:17:32 +0000 | |
---|---|---|
committer | 2007-05-29 00:17:32 +0000 | |
commit | 5e18f1535bb54e0198255569ce0c0264b6c75d74 (patch) | |
tree | 66d3021732696695df5afdee66ff8071f6f82096 /sys | |
parent | put commented out entry for kern.nosuidcoredump=2 in, yes theo & tedu (diff) | |
download | wireguard-openbsd-5e18f1535bb54e0198255569ce0c0264b6c75d74.tar.xz wireguard-openbsd-5e18f1535bb54e0198255569ce0c0264b6c75d74.zip |
Add a name argument to the RWLOCK_INITIALIZER macro.
Pick reasonble names for the locks involved..
ok tedu@, art@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/amd64/gdt.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_malloc.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_sysctl.c | 6 | ||||
-rw-r--r-- | sys/kern/tty_pty.c | 5 | ||||
-rw-r--r-- | sys/net/pf_ioctl.c | 4 | ||||
-rw-r--r-- | sys/nfs/nfs_kq.c | 4 | ||||
-rw-r--r-- | sys/nfs/nfs_node.c | 4 | ||||
-rw-r--r-- | sys/sys/rwlock.h | 4 | ||||
-rw-r--r-- | sys/uvm/uvm_swap.c | 4 |
9 files changed, 20 insertions, 19 deletions
diff --git a/sys/arch/amd64/amd64/gdt.c b/sys/arch/amd64/amd64/gdt.c index d6039243f9d..ba9e4c8adbe 100644 --- a/sys/arch/amd64/amd64/gdt.c +++ b/sys/arch/amd64/amd64/gdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gdt.c,v 1.9 2007/01/15 23:19:05 jsg Exp $ */ +/* $OpenBSD: gdt.c,v 1.10 2007/05/29 00:17:33 thib Exp $ */ /* $NetBSD: gdt.c,v 1.1 2003/04/26 18:39:28 fvdl Exp $ */ /*- @@ -60,7 +60,7 @@ int gdt_dynavail; int gdt_next; /* next available slot for sweeping */ int gdt_free; /* next free slot; terminated with GNULL_SEL */ -struct rwlock gdt_lock_store = RWLOCK_INITIALIZER; +struct rwlock gdt_lock_store = RWLOCK_INITIALIZER("gdtlk"); static __inline void gdt_lock(void); static __inline void gdt_unlock(void); diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index cd7a54107ef..59ea3233a1a 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_malloc.c,v 1.69 2007/04/12 21:47:45 miod Exp $ */ +/* $OpenBSD: kern_malloc.c,v 1.70 2007/05/29 00:17:32 thib Exp $ */ /* $NetBSD: kern_malloc.c,v 1.15.4.2 1996/06/13 17:10:56 cgd Exp $ */ /* @@ -83,7 +83,7 @@ int buckstring_init = 0; #if defined(KMEMSTATS) || defined(DIAGNOSTIC) || defined(FFS_SOFTUPDATES) char *memname[] = INITKMEMNAMES; char *memall = NULL; -struct rwlock sysctl_kmemlock = RWLOCK_INITIALIZER; +struct rwlock sysctl_kmemlock = RWLOCK_INITIALIZER("sysctlklk"); #endif #ifdef DIAGNOSTIC diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 6cf0c7fc2fa..794d1d853c6 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sysctl.c,v 1.152 2007/05/16 17:27:30 art Exp $ */ +/* $OpenBSD: kern_sysctl.c,v 1.153 2007/05/29 00:17:32 thib Exp $ */ /* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */ /*- @@ -111,8 +111,8 @@ int perflevel = 100; * Lock to avoid too many processes vslocking a large amount of memory * at the same time. */ -struct rwlock sysctl_lock = RWLOCK_INITIALIZER; -struct rwlock sysctl_disklock = RWLOCK_INITIALIZER; +struct rwlock sysctl_lock = RWLOCK_INITIALIZER("sysctllk"); +struct rwlock sysctl_disklock = RWLOCK_INITIALIZER("sysctldlk"); int sys___sysctl(struct proc *p, void *v, register_t *retval) diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index e7105ce0709..a49334d7951 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_pty.c,v 1.33 2006/03/04 19:33:21 miod Exp $ */ +/* $OpenBSD: tty_pty.c,v 1.34 2007/05/29 00:17:32 thib Exp $ */ /* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */ /* @@ -87,7 +87,8 @@ struct pt_softc { static struct pt_softc **pt_softc = NULL; /* pty array */ static int npty = 0; /* size of pty array */ static int maxptys = NPTY_MAX; /* maximum number of ptys */ -struct rwlock pt_softc_lock = RWLOCK_INITIALIZER; /* for pty array */ +/* for pty array */ +struct rwlock pt_softc_lock = RWLOCK_INITIALIZER("ptarrlk"); #define PF_PKT 0x08 /* packet mode */ #define PF_STOPPED 0x10 /* user told stopped */ diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c index 5694717f609..f6a20e71751 100644 --- a/sys/net/pf_ioctl.c +++ b/sys/net/pf_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_ioctl.c,v 1.175 2007/02/26 22:47:43 deraadt Exp $ */ +/* $OpenBSD: pf_ioctl.c,v 1.176 2007/05/29 00:17:32 thib Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -111,7 +111,7 @@ void pf_hash_rule_addr(MD5_CTX *, struct pf_rule_addr *); int pf_commit_rules(u_int32_t, int, char *); struct pf_rule pf_default_rule; -struct rwlock pf_consistency_lock = RWLOCK_INITIALIZER; +struct rwlock pf_consistency_lock = RWLOCK_INITIALIZER("pfcnslk"); #ifdef ALTQ static int pf_altq_running; #endif diff --git a/sys/nfs/nfs_kq.c b/sys/nfs/nfs_kq.c index f34c134be39..ace011ff805 100644 --- a/sys/nfs/nfs_kq.c +++ b/sys/nfs/nfs_kq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_kq.c,v 1.6 2007/05/28 21:47:50 thib Exp $ */ +/* $OpenBSD: nfs_kq.c,v 1.7 2007/05/29 00:17:32 thib Exp $ */ /* $NetBSD: nfs_kq.c,v 1.7 2003/10/30 01:43:10 simonb Exp $ */ /*- @@ -73,7 +73,7 @@ struct kevq { }; SLIST_HEAD(kevqlist, kevq); -struct rwlock nfskevq_lock = RWLOCK_INITIALIZER; +struct rwlock nfskevq_lock = RWLOCK_INITIALIZER("nfskqlk"); static struct proc *pnfskq; static struct kevqlist kevlist = SLIST_HEAD_INITIALIZER(kevlist); diff --git a/sys/nfs/nfs_node.c b/sys/nfs/nfs_node.c index 4dfb5340ffa..6c22ad13751 100644 --- a/sys/nfs/nfs_node.c +++ b/sys/nfs/nfs_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_node.c,v 1.33 2007/05/28 21:07:31 thib Exp $ */ +/* $OpenBSD: nfs_node.c,v 1.34 2007/05/29 00:17:33 thib Exp $ */ /* $NetBSD: nfs_node.c,v 1.16 1996/02/18 11:53:42 fvdl Exp $ */ /* @@ -57,7 +57,7 @@ LIST_HEAD(nfsnodehashhead, nfsnode) *nfsnodehashtbl; u_long nfsnodehash; -struct rwlock nfs_hashlock = RWLOCK_INITIALIZER; +struct rwlock nfs_hashlock = RWLOCK_INITIALIZER("nfshshlk"); struct pool nfs_node_pool; diff --git a/sys/sys/rwlock.h b/sys/sys/rwlock.h index 61c48eea1ce..cc227c9c2c4 100644 --- a/sys/sys/rwlock.h +++ b/sys/sys/rwlock.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rwlock.h,v 1.10 2007/05/04 12:56:15 art Exp $ */ +/* $OpenBSD: rwlock.h,v 1.11 2007/05/29 00:17:32 thib Exp $ */ /* * Copyright (c) 2002 Artur Grabowski <art@openbsd.org> * All rights reserved. @@ -76,7 +76,7 @@ struct rwlock { const char *rwl_name; }; -#define RWLOCK_INITIALIZER { 0 } +#define RWLOCK_INITIALIZER(name) { 0, name } #define RWLOCK_WAIT 0x01UL #define RWLOCK_WRWANT 0x02UL diff --git a/sys/uvm/uvm_swap.c b/sys/uvm/uvm_swap.c index 6834f89a462..afc772d1df9 100644 --- a/sys/uvm/uvm_swap.c +++ b/sys/uvm/uvm_swap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_swap.c,v 1.68 2007/04/13 18:57:49 art Exp $ */ +/* $OpenBSD: uvm_swap.c,v 1.69 2007/05/29 00:17:33 thib Exp $ */ /* $NetBSD: uvm_swap.c,v 1.40 2000/11/17 11:39:39 mrg Exp $ */ /* @@ -227,7 +227,7 @@ LIST_HEAD(swap_priority, swappri); static struct swap_priority swap_priority; /* locks */ -struct rwlock swap_syscall_lock = RWLOCK_INITIALIZER; +struct rwlock swap_syscall_lock = RWLOCK_INITIALIZER("swplk"); /* * prototypes |