on amd64 and i386.
-/* $OpenBSD: db_interface.c,v 1.26 2017/03/03 20:49:47 bluhm Exp $ */
+/* $OpenBSD: db_interface.c,v 1.27 2017/04/20 14:13:00 visa Exp $ */
/* $NetBSD: db_interface.c,v 1.1 2003/04/26 18:39:27 fvdl Exp $ */
/*
extern int trap_types;
#ifdef MULTIPROCESSOR
-struct mutex ddb_mp_mutex = MUTEX_INITIALIZER(IPL_HIGH);
+struct mutex ddb_mp_mutex =
+ MUTEX_INITIALIZER_FLAGS(IPL_HIGH, "ddb_mp_mutex", MTX_NOWITNESS);
volatile int ddb_state = DDB_STATE_NOT_RUNNING;
volatile cpuid_t ddb_active_cpu;
boolean_t db_switch_cpu;
-/* $OpenBSD: db_mp.c,v 1.8 2016/03/07 05:32:46 naddy Exp $ */
+/* $OpenBSD: db_mp.c,v 1.9 2017/04/20 14:13:00 visa Exp $ */
/*
* Copyright (c) 2003, 2004 Andreas Gunnarsson <andreas@openbsd.org>
#include <ddb/db_output.h>
-struct mutex ddb_mp_mutex = MUTEX_INITIALIZER(IPL_HIGH);
+struct mutex ddb_mp_mutex =
+ MUTEX_INITIALIZER_FLAGS(IPL_HIGH, "ddb_mp_mutex", MTX_NOWITNESS);
volatile int ddb_state = DDB_STATE_NOT_RUNNING; /* protected by ddb_mp_mutex */
volatile cpuid_t ddb_active_cpu; /* protected by ddb_mp_mutex */
/* $NetBSD: mem.c,v 1.31 1996/05/03 19:42:19 christos Exp $ */
-/* $OpenBSD: mem.c,v 1.51 2016/09/25 15:23:37 deraadt Exp $ */
+/* $OpenBSD: mem.c,v 1.52 2017/04/20 14:13:00 visa Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1982, 1986, 1990, 1993
return (0);
}
+static struct rwlock physlock = RWLOCK_INITIALIZER("mmrw");
int
mmrw(dev_t dev, struct uio *uio, int flags)
{
- static struct rwlock physlock = RWLOCK_INITIALIZER("mmrw");
vaddr_t o, v;
size_t c;
struct iovec *iov;
-/* $OpenBSD: drm_crtc.c,v 1.23 2016/04/08 08:27:53 kettenis Exp $ */
+/* $OpenBSD: drm_crtc.c,v 1.24 2017/04/20 14:13:00 visa Exp $ */
/*
* Copyright (c) 2006-2008 Intel Corporation
* Copyright (c) 2007 Dave Airlie <airlied@linux.ie>
crtc->invert_dimensions = false;
drm_modeset_lock_all(dev);
- rw_init(&crtc->mutex, "crtcl");
+ rw_init_flags(&crtc->mutex, "crtcl", RWL_DUPOK);
mutex_lock_nest_lock(&crtc->mutex, &dev->mode_config.mutex);
ret = drm_mode_object_get(dev, &crtc->base, DRM_MODE_OBJECT_CRTC);
-/* $OpenBSD: cd9660_vfsops.c,v 1.83 2016/09/07 17:30:12 natano Exp $ */
+/* $OpenBSD: cd9660_vfsops.c,v 1.84 2017/04/20 14:13:00 visa Exp $ */
/* $NetBSD: cd9660_vfsops.c,v 1.26 1997/06/13 15:38:58 pk Exp $ */
/*-
return (error);
}
ip = malloc(sizeof(*ip), M_ISOFSNODE, M_WAITOK | M_ZERO);
- rrw_init(&ip->i_lock, "isoinode");
+ rrw_init_flags(&ip->i_lock, "isoinode", RWL_DUPOK);
vp->v_data = ip;
ip->i_vnode = vp;
ip->i_dev = dev;
-/* $OpenBSD: udf_vfsops.c,v 1.58 2017/02/08 01:32:38 jsg Exp $ */
+/* $OpenBSD: udf_vfsops.c,v 1.59 2017/04/20 14:13:00 visa Exp $ */
/*
* Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org>
vp->v_data = up;
vref(ump->um_devvp);
- rrw_init(&up->u_lock, "unode");
+ rrw_init_flags(&up->u_lock, "unode", RWL_DUPOK);
/*
* udf_hashins() will lock the vnode for us.
-/* $OpenBSD: subr_disk.c,v 1.228 2016/09/02 09:44:27 tom Exp $ */
+/* $OpenBSD: subr_disk.c,v 1.229 2017/04/20 14:13:00 visa Exp $ */
/* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */
/*
int
disk_construct(struct disk *diskp)
{
- rw_init(&diskp->dk_lock, "dklk");
+ rw_init_flags(&diskp->dk_lock, "dklk", RWL_IS_VNODE);
mtx_init(&diskp->dk_mtx, IPL_BIO);
diskp->dk_flags |= DKF_CONSTRUCTED;
-/* $OpenBSD: subr_pool.c,v 1.207 2017/02/20 00:43:25 dlg Exp $ */
+/* $OpenBSD: subr_pool.c,v 1.208 2017/04/20 14:13:00 visa Exp $ */
/* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */
/*-
pp->pr_nidle = 0;
pp->pr_ipl = ipl;
- mtx_init(&pp->pr_mtx, pp->pr_ipl);
- mtx_init(&pp->pr_requests_mtx, pp->pr_ipl);
+ mtx_init_flags(&pp->pr_mtx, pp->pr_ipl, wchan, 0);
+ mtx_init_flags(&pp->pr_requests_mtx, pp->pr_ipl, wchan, 0);
TAILQ_INIT(&pp->pr_requests);
if (phpool.pr_size == 0) {
-/* $OpenBSD: subr_prf.c,v 1.87 2016/05/17 23:43:47 bluhm Exp $ */
+/* $OpenBSD: subr_prf.c,v 1.88 2017/04/20 14:13:00 visa Exp $ */
/* $NetBSD: subr_prf.c,v 1.45 1997/10/24 18:14:25 chuck Exp $ */
/*-
int kprintf(const char *, int, void *, char *, va_list);
void kputchar(int, int, struct tty *);
-struct mutex kprintf_mutex = MUTEX_INITIALIZER(IPL_HIGH);
+struct mutex kprintf_mutex =
+ MUTEX_INITIALIZER_FLAGS(IPL_HIGH, "kprintf", MTX_NOWITNESS);
/*
* globals
-/* $OpenBSD: vfs_subr.c,v 1.258 2017/04/04 18:17:02 deraadt Exp $ */
+/* $OpenBSD: vfs_subr.c,v 1.259 2017/04/20 14:13:00 visa Exp $ */
/* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */
/*
/* new mountpoints need their lock initialised */
if (mp->mnt_lock.rwl_name == NULL)
- rw_init(&mp->mnt_lock, "vfslock");
+ rw_init_flags(&mp->mnt_lock, "vfslock", RWL_IS_VNODE);
if (flags & VB_WRITE)
rwflags |= RW_WRITE;
-/* $OpenBSD: fuse_vfsops.c,v 1.28 2016/09/07 17:53:35 natano Exp $ */
+/* $OpenBSD: fuse_vfsops.c,v 1.29 2017/04/20 14:13:00 visa Exp $ */
/*
* Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com>
*
}
ip = malloc(sizeof(*ip), M_FUSEFS, M_WAITOK | M_ZERO);
- rrw_init(&ip->ufs_ino.i_lock, "fuseinode");
+ rrw_init_flags(&ip->ufs_ino.i_lock, "fuseinode", RWL_DUPOK);
nvp->v_data = ip;
ip->ufs_ino.i_vnode = nvp;
ip->ufs_ino.i_dev = fmp->dev;
-/* $OpenBSD: msdosfs_denode.c,v 1.57 2016/06/19 11:54:33 natano Exp $ */
+/* $OpenBSD: msdosfs_denode.c,v 1.58 2017/04/20 14:13:00 visa Exp $ */
/* $NetBSD: msdosfs_denode.c,v 1.23 1997/10/17 11:23:58 ws Exp $ */
/*-
return (error);
}
ldep = malloc(sizeof(*ldep), M_MSDOSFSNODE, M_WAITOK | M_ZERO);
- rrw_init(&ldep->de_lock, "denode");
+ rrw_init_flags(&ldep->de_lock, "denode", RWL_DUPOK);
nvp->v_data = ldep;
ldep->de_vnode = nvp;
ldep->de_flag = 0;
-/* $OpenBSD: bpf.c,v 1.160 2017/01/24 22:40:55 mpi Exp $ */
+/* $OpenBSD: bpf.c,v 1.161 2017/04/20 14:13:00 visa Exp $ */
/* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */
/*
void bpf_insn_dtor(void *, void *);
struct srp_gc bpf_insn_gc = SRP_GC_INITIALIZER(bpf_insn_dtor, NULL);
+struct rwlock bpf_sysctl_lk = RWLOCK_INITIALIZER("bpfsz");
+
int
bpf_movein(struct uio *uio, u_int linktype, struct mbuf **mp,
struct sockaddr *sockp, struct bpf_insn *filter)
bpf_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
size_t newlen)
{
- static struct rwlock bpf_sysctl_lk = RWLOCK_INITIALIZER("bpfsz");
int flags = RW_INTR;
int error;
-/* $OpenBSD: tmpfs_subr.c,v 1.17 2016/09/22 10:23:27 jsg Exp $ */
+/* $OpenBSD: tmpfs_subr.c,v 1.18 2017/04/20 14:13:00 visa Exp $ */
/* $NetBSD: tmpfs_subr.c,v 1.79 2012/03/13 18:40:50 elad Exp $ */
/*
return error;
}
- rrw_init(&node->tn_vlock, "tnode");
+ rrw_init_flags(&node->tn_vlock, "tnode", RWL_DUPOK);
vp->v_type = node->tn_type;
/* Type-specific initialization. */
-/* $OpenBSD: ext2fs_vfsops.c,v 1.97 2016/09/15 02:00:18 dlg Exp $ */
+/* $OpenBSD: ext2fs_vfsops.c,v 1.98 2017/04/20 14:13:00 visa Exp $ */
/* $NetBSD: ext2fs_vfsops.c,v 1.1 1997/06/11 09:34:07 bouyer Exp $ */
/*
}
ip = pool_get(&ext2fs_inode_pool, PR_WAITOK|PR_ZERO);
- rrw_init(&ip->i_lock, "inode");
+ rrw_init_flags(&ip->i_lock, "inode", RWL_DUPOK);
vp->v_data = ip;
ip->i_vnode = vp;
ip->i_ump = ump;
-/* $OpenBSD: ffs_vfsops.c,v 1.164 2016/09/15 02:00:18 dlg Exp $ */
+/* $OpenBSD: ffs_vfsops.c,v 1.165 2017/04/20 14:13:00 visa Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */
/*
vp->v_flag |= VLOCKSWORK;
#endif
ip = pool_get(&ffs_ino_pool, PR_WAITOK|PR_ZERO);
- rrw_init(&ip->i_lock, "inode");
+ rrw_init_flags(&ip->i_lock, "inode", RWL_DUPOK | RWL_IS_VNODE);
ip->i_ump = ump;
vref(ip->i_devvp);
vp->v_data = ip;
-/* $OpenBSD: uvm_map.c,v 1.229 2017/02/14 10:31:15 mpi Exp $ */
+/* $OpenBSD: uvm_map.c,v 1.230 2017/04/20 14:13:00 visa Exp $ */
/* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */
/*
map->s_start = map->s_end = 0; /* Empty stack area by default. */
map->flags = flags;
map->timestamp = 0;
- rw_init(&map->lock, "vmmaplk");
+ rw_init_flags(&map->lock, "vmmaplk", RWL_DUPOK);
mtx_init(&map->mtx, IPL_VM);
mtx_init(&map->flags_lock, IPL_VM);