diff options
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/init_main.c | 6 | ||||
-rw-r--r-- | sys/kern/kern_descrip.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_fork.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_intr.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_jail.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_lock.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_malloc.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_mtxpool.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_proc.c | 6 | ||||
-rw-r--r-- | sys/kern/kern_resource.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_sema.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_timeout.c | 2 | ||||
-rw-r--r-- | sys/kern/subr_disklabel.c | 2 | ||||
-rw-r--r-- | sys/kern/subr_eventhandler.c | 2 | ||||
-rw-r--r-- | sys/kern/subr_mbuf.c | 4 | ||||
-rw-r--r-- | sys/kern/subr_rman.c | 4 | ||||
-rw-r--r-- | sys/kern/subr_smp.c | 2 | ||||
-rw-r--r-- | sys/kern/subr_taskqueue.c | 4 | ||||
-rw-r--r-- | sys/kern/sys_generic.c | 2 | ||||
-rw-r--r-- | sys/kern/sys_pipe.c | 2 | ||||
-rw-r--r-- | sys/kern/uipc_syscalls.c | 2 | ||||
-rw-r--r-- | sys/kern/vfs_bio.c | 2 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 14 |
23 files changed, 38 insertions, 38 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index afad11d..4f0aa45 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -305,14 +305,14 @@ proc0_init(void *dummy __unused) */ LIST_INSERT_HEAD(&allproc, p, p_list); LIST_INSERT_HEAD(PIDHASH(0), p, p_hash); - mtx_init(&pgrp0.pg_mtx, "process group", MTX_DEF|MTX_DUPOK); + mtx_init(&pgrp0.pg_mtx, "process group", NULL, MTX_DEF | MTX_DUPOK); p->p_pgrp = &pgrp0; LIST_INSERT_HEAD(PGRPHASH(0), &pgrp0, pg_hash); LIST_INIT(&pgrp0.pg_members); LIST_INSERT_HEAD(&pgrp0.pg_members, p, p_pglist); pgrp0.pg_session = &session0; - mtx_init(&session0.s_mtx, "session", MTX_DEF); + mtx_init(&session0.s_mtx, "session", NULL, MTX_DEF); session0.s_count = 1; session0.s_leader = p; @@ -359,7 +359,7 @@ proc0_init(void *dummy __unused) /* Create the file descriptor table. */ fdp = &filedesc0; p->p_fd = &fdp->fd_fd; - mtx_init(&fdp->fd_fd.fd_mtx, FILEDESC_LOCK_DESC, MTX_DEF); + mtx_init(&fdp->fd_fd.fd_mtx, FILEDESC_LOCK_DESC, NULL, MTX_DEF); fdp->fd_fd.fd_refcnt = 1; fdp->fd_fd.fd_cmask = cmask; fdp->fd_fd.fd_ofiles = fdp->fd_dfiles; diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index b97386d..034aba9 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1167,7 +1167,7 @@ fdinit(td) MALLOC(newfdp, struct filedesc0 *, sizeof(struct filedesc0), M_FILEDESC, M_WAITOK | M_ZERO); - mtx_init(&newfdp->fd_fd.fd_mtx, FILEDESC_LOCK_DESC, MTX_DEF); + mtx_init(&newfdp->fd_fd.fd_mtx, FILEDESC_LOCK_DESC, NULL, MTX_DEF); FILEDESC_LOCK(&newfdp->fd_fd); newfdp->fd_fd.fd_cdir = fdp->fd_cdir; if (newfdp->fd_fd.fd_cdir) @@ -1228,7 +1228,7 @@ fdcopy(td) bcopy(fdp, newfdp, sizeof(struct filedesc)); FILEDESC_UNLOCK(fdp); bzero(&newfdp->fd_mtx, sizeof(newfdp->fd_mtx)); - mtx_init(&newfdp->fd_mtx, FILEDESC_LOCK_DESC, MTX_DEF); + mtx_init(&newfdp->fd_mtx, FILEDESC_LOCK_DESC, NULL, MTX_DEF); if (newfdp->fd_cdir) VREF(newfdp->fd_cdir); if (newfdp->fd_rdir) diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index ec959d5..877d8a7 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -464,7 +464,7 @@ again: */ proc_linkup(p2, kg2, ke2, td2); - mtx_init(&p2->p_mtx, "process lock", MTX_DEF|MTX_DUPOK); + mtx_init(&p2->p_mtx, "process lock", NULL, MTX_DEF | MTX_DUPOK); PROC_LOCK(p2); /* note.. XXXKSE no pcb or u-area yet */ diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index 23ca98f..4020a19 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -183,7 +183,7 @@ ithread_create(struct ithd **ithread, int vector, int flags, ithd->it_enable = enable; ithd->it_flags = flags; TAILQ_INIT(&ithd->it_handlers); - mtx_init(&ithd->it_lock, "ithread", MTX_DEF); + mtx_init(&ithd->it_lock, "ithread", NULL, MTX_DEF); mtx_lock(&ithd->it_lock); va_start(ap, fmt); diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index aae12be..2cbe24c 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -74,7 +74,7 @@ jail(td, uap) mtx_lock(&Giant); MALLOC(pr, struct prison *, sizeof *pr , M_PRISON, M_WAITOK | M_ZERO); - mtx_init(&pr->pr_mtx, "jail mutex", MTX_DEF); + mtx_init(&pr->pr_mtx, "jail mutex", NULL, MTX_DEF); pr->pr_securelevel = securelevel; error = copyinstr(j.hostname, &pr->pr_host, sizeof pr->pr_host, 0); if (error) diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index d9d61c2..fddfd26 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -89,7 +89,7 @@ lockmgr_init(void *dummy __unused) * initialized in a call to lockinit(). */ if (lock_mtx_valid == 0) { - mtx_init(&lock_mtx, "lockmgr", MTX_DEF); + mtx_init(&lock_mtx, "lockmgr", NULL, MTX_DEF); lock_mtx_valid = 1; } } @@ -496,7 +496,7 @@ lockinit(lkp, prio, wmesg, timo, flags) "timo == %d, flags = 0x%x\n", lkp, prio, wmesg, timo, flags); if (lock_mtx_valid == 0) { - mtx_init(&lock_mtx, "lockmgr", MTX_DEF); + mtx_init(&lock_mtx, "lockmgr", NULL, MTX_DEF); lock_mtx_valid = 1; } /* diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index e249e5b..d2806fd 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -325,7 +325,7 @@ kmeminit(dummy) int bits; int i; - mtx_init(&malloc_mtx, "malloc", MTX_DEF); + mtx_init(&malloc_mtx, "malloc", NULL, MTX_DEF); /* * Try to auto-tune the kernel memory size, so that it is diff --git a/sys/kern/kern_mtxpool.c b/sys/kern/kern_mtxpool.c index f0f1208..3d4aa1c 100644 --- a/sys/kern/kern_mtxpool.c +++ b/sys/kern/kern_mtxpool.c @@ -63,7 +63,7 @@ mtx_pool_setup(void *dummy __unused) int i; for (i = 0; i < MTX_POOL_SIZE; ++i) - mtx_init(&mtx_pool_ary[i], "pool mutex", MTX_DEF | MTX_NOWITNESS | MTX_QUIET); + mtx_init(&mtx_pool_ary[i], "pool mutex", NULL, MTX_DEF | MTX_NOWITNESS | MTX_QUIET); mtx_pool_valid = 1; } diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 7e62eff..3d9cb06 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -96,7 +96,7 @@ procinit() sx_init(&allproc_lock, "allproc"); sx_init(&proctree_lock, "proctree"); sx_init(&pgrpsess_lock, "pgrpsess"); - mtx_init(&pargs_ref_lock, "struct pargs.ref", MTX_DEF); + mtx_init(&pargs_ref_lock, "struct pargs.ref", NULL, MTX_DEF); LIST_INIT(&allproc); LIST_INIT(&zombproc); pidhashtbl = hashinit(maxproc / 4, M_PROC, &pidhash); @@ -344,13 +344,13 @@ enterpgrp(p, pgid, pgrp, sess) KASSERT(!SESS_LEADER(p), ("enterpgrp: session leader attempted setpgrp")); - mtx_init(&pgrp->pg_mtx, "process group", MTX_DEF|MTX_DUPOK); + mtx_init(&pgrp->pg_mtx, "process group", NULL, MTX_DEF | MTX_DUPOK); if (sess != NULL) { /* * new session */ - mtx_init(&sess->s_mtx, "session", MTX_DEF); + mtx_init(&sess->s_mtx, "session", NULL, MTX_DEF); PROC_LOCK(p); p->p_flag &= ~P_CONTROLT; PROC_UNLOCK(p); diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index 26349bd..c054acf 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -827,7 +827,7 @@ uihashinit() { uihashtbl = hashinit(maxproc / 16, M_UIDINFO, &uihash); - mtx_init(&uihashtbl_mtx, "uidinfo hash", MTX_DEF); + mtx_init(&uihashtbl_mtx, "uidinfo hash", NULL, MTX_DEF); } /* diff --git a/sys/kern/kern_sema.c b/sys/kern/kern_sema.c index cb47ba9..61435bd 100644 --- a/sys/kern/kern_sema.c +++ b/sys/kern/kern_sema.c @@ -50,7 +50,7 @@ sema_init(struct sema *sema, int value, const char *description) KASSERT((value >= 0), ("%s(): negative value\n", __func__)); bzero(sema, sizeof(*sema)); - mtx_init(&sema->sema_mtx, "sema backing lock", + mtx_init(&sema->sema_mtx, description, "sema backing lock", MTX_DEF | MTX_NOWITNESS | MTX_QUIET); cv_init(&sema->sema_cv, description); sema->sema_value = value; diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index d907e83..937b0c2 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -107,7 +107,7 @@ kern_timeout_callwheel_init(void) for (i = 0; i < callwheelsize; i++) { TAILQ_INIT(&callwheel[i]); } - mtx_init(&callout_lock, "callout", MTX_SPIN | MTX_RECURSE); + mtx_init(&callout_lock, "callout", NULL, MTX_SPIN | MTX_RECURSE); } /* diff --git a/sys/kern/subr_disklabel.c b/sys/kern/subr_disklabel.c index d69e906..8a7b70e 100644 --- a/sys/kern/subr_disklabel.c +++ b/sys/kern/subr_disklabel.c @@ -58,7 +58,7 @@ static void dksort_init(void) { - mtx_init(&dksort_mtx, "dksort", MTX_DEF); + mtx_init(&dksort_mtx, "dksort", NULL, MTX_DEF); } SYSINIT(dksort, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, dksort_init, NULL) diff --git a/sys/kern/subr_eventhandler.c b/sys/kern/subr_eventhandler.c index 0a64ff1..45b4302 100644 --- a/sys/kern/subr_eventhandler.c +++ b/sys/kern/subr_eventhandler.c @@ -55,7 +55,7 @@ static void eventhandler_init(void *dummy __unused) { TAILQ_INIT(&eventhandler_lists); - mtx_init(&eventhandler_mutex, "eventhandler", MTX_DEF | MTX_RECURSE); + mtx_init(&eventhandler_mutex, "eventhandler", NULL, MTX_DEF | MTX_RECURSE); eventhandler_lists_initted = 1; } SYSINIT(eventhandlers, SI_SUB_EVENTHANDLER, SI_ORDER_FIRST, eventhandler_init, diff --git a/sys/kern/subr_mbuf.c b/sys/kern/subr_mbuf.c index da86199..008dea5 100644 --- a/sys/kern/subr_mbuf.c +++ b/sys/kern/subr_mbuf.c @@ -368,7 +368,7 @@ mbuf_init(void *dummy) /* * Initialize condition variables and general container mutex locks. */ - mtx_init(&mbuf_gen, "mbuf subsystem general lists lock", 0); + mtx_init(&mbuf_gen, "mbuf subsystem general lists lock", NULL, 0); cv_init(&(mb_list_mbuf.ml_genlist->mgl_mstarved), "mbuf pool starved"); cv_init(&(mb_list_clust.ml_genlist->mgl_mstarved), "mcluster pool starved"); @@ -421,7 +421,7 @@ mbuf_init(void *dummy) (mb_list_clust.ml_cntlst[i] == NULL)) goto bad; - mtx_init(&mbuf_pcpu[i], "mbuf PCPU list lock", 0); + mtx_init(&mbuf_pcpu[i], "mbuf PCPU list lock", NULL, 0); mb_list_mbuf.ml_cntlst[i]->mb_cont.mc_lock = mb_list_clust.ml_cntlst[i]->mb_cont.mc_lock = &mbuf_pcpu[i]; diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index 119a967..85af088 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -90,7 +90,7 @@ rman_init(struct rman *rm) if (once == 0) { once = 1; TAILQ_INIT(&rman_head); - mtx_init(&rman_mtx, "rman head", MTX_DEF); + mtx_init(&rman_mtx, "rman head", NULL, MTX_DEF); } if (rm->rm_type == RMAN_UNINIT) @@ -102,7 +102,7 @@ rman_init(struct rman *rm) rm->rm_mtx = malloc(sizeof *rm->rm_mtx, M_RMAN, M_NOWAIT | M_ZERO); if (rm->rm_mtx == 0) return ENOMEM; - mtx_init(rm->rm_mtx, "rman", MTX_DEF); + mtx_init(rm->rm_mtx, "rman", NULL, MTX_DEF); mtx_lock(&rman_mtx); TAILQ_INSERT_TAIL(&rman_head, rm, rm_link); diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c index 34df61d..77d0df4 100644 --- a/sys/kern/subr_smp.c +++ b/sys/kern/subr_smp.c @@ -105,7 +105,7 @@ mp_start(void *dummy) if (mp_probe_status == 0) return; - mtx_init(&smp_rv_mtx, "smp rendezvous", MTX_SPIN); + mtx_init(&smp_rv_mtx, "smp rendezvous", NULL, MTX_SPIN); cpu_mp_start(); printf("FreeBSD/SMP: Multiprocessor System Detected: %d CPUs\n", mp_ncpus); diff --git a/sys/kern/subr_taskqueue.c b/sys/kern/subr_taskqueue.c index 72afa6b..19a93ad 100644 --- a/sys/kern/subr_taskqueue.c +++ b/sys/kern/subr_taskqueue.c @@ -59,7 +59,7 @@ static void init_taskqueue_list(void *data __unused) { - mtx_init(&taskqueue_queues_mutex, "taskqueue list", MTX_DEF); + mtx_init(&taskqueue_queues_mutex, "taskqueue list", NULL, MTX_DEF); STAILQ_INIT(&taskqueue_queues); } SYSINIT(taskqueue_list, SI_SUB_INTRINSIC, SI_ORDER_ANY, init_taskqueue_list, @@ -80,7 +80,7 @@ taskqueue_create(const char *name, int mflags, queue->tq_enqueue = enqueue; queue->tq_context = context; queue->tq_draining = 0; - mtx_init(&queue->tq_mutex, "taskqueue", MTX_DEF); + mtx_init(&queue->tq_mutex, "taskqueue", NULL, MTX_DEF); mtx_lock(&taskqueue_queues_mutex); STAILQ_INSERT_TAIL(&taskqueue_queues, queue, tq_link); diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 196be5a..4ce45b1 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -1221,5 +1221,5 @@ selectinit(dummy) void *dummy; { cv_init(&selwait, "select"); - mtx_init(&sellock, "sellck", MTX_DEF); + mtx_init(&sellock, "sellck", NULL, MTX_DEF); } diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 56b2c56..8699ca2 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -265,7 +265,7 @@ pipe(td, uap) td->td_retval[1] = fd; rpipe->pipe_peer = wpipe; wpipe->pipe_peer = rpipe; - mtx_init(pmtx, "pipe mutex", MTX_DEF | MTX_RECURSE); + mtx_init(pmtx, "pipe mutex", NULL, MTX_DEF | MTX_RECURSE); rpipe->pipe_mtxp = wpipe->pipe_mtxp = pmtx; fdrop(rf, td); diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index b4d98d4..56b8fee 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -1552,7 +1552,7 @@ sf_buf_init(void *arg) { int i; - mtx_init(&sf_freelist.sf_lock, "sf_bufs list lock", MTX_DEF); + mtx_init(&sf_freelist.sf_lock, "sf_bufs list lock", NULL, MTX_DEF); mtx_lock(&sf_freelist.sf_lock); SLIST_INIT(&sf_freelist.sf_head); sf_base = kmem_alloc_pageable(kernel_map, nsfbufs * PAGE_SIZE); diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index a81136a..7c4fd8e 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -484,7 +484,7 @@ bufinit(void) GIANT_REQUIRED; LIST_INIT(&invalhash); - mtx_init(&buftimelock, "buftime lock", MTX_DEF); + mtx_init(&buftimelock, "buftime lock", NULL, MTX_DEF); for (i = 0; i <= bufhashmask; i++) LIST_INIT(&bufhashtbl[i]); diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 7967b04..a48b138 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -258,7 +258,7 @@ void v_addpollinfo(struct vnode *vp) { vp->v_pollinfo = uma_zalloc(vnodepoll_zone, M_WAITOK); - mtx_init(&vp->v_pollinfo->vpi_lock, "vnode pollinfo", MTX_DEF); + mtx_init(&vp->v_pollinfo->vpi_lock, "vnode pollinfo", NULL, MTX_DEF); } /* @@ -270,12 +270,12 @@ vntblinit(void *dummy __unused) desiredvnodes = maxproc + cnt.v_page_count / 4; minvnodes = desiredvnodes / 4; - mtx_init(&mountlist_mtx, "mountlist", MTX_DEF); - mtx_init(&mntvnode_mtx, "mntvnode", MTX_DEF); - mtx_init(&mntid_mtx, "mntid", MTX_DEF); - mtx_init(&spechash_mtx, "spechash", MTX_DEF); + mtx_init(&mountlist_mtx, "mountlist", NULL, MTX_DEF); + mtx_init(&mntvnode_mtx, "mntvnode", NULL, MTX_DEF); + mtx_init(&mntid_mtx, "mntid", NULL, MTX_DEF); + mtx_init(&spechash_mtx, "spechash", NULL, MTX_DEF); TAILQ_INIT(&vnode_free_list); - mtx_init(&vnode_free_list_mtx, "vnode_free_list", MTX_DEF); + mtx_init(&vnode_free_list_mtx, "vnode_free_list", NULL, MTX_DEF); vnode_zone = uma_zcreate("VNODE", sizeof (struct vnode), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); vnodepoll_zone = uma_zcreate("VNODEPOLL", sizeof (struct vpollinfo), @@ -888,7 +888,7 @@ getnewvnode(tag, mp, vops, vpp) mtx_unlock(&vnode_free_list_mtx); vp = (struct vnode *) uma_zalloc(vnode_zone, M_WAITOK); bzero((char *) vp, sizeof *vp); - mtx_init(&vp->v_interlock, "vnode interlock", MTX_DEF); + mtx_init(&vp->v_interlock, "vnode interlock", NULL, MTX_DEF); vp->v_dd = vp; cache_purge(vp); LIST_INIT(&vp->v_cache_src); |