From 50105bcf1a00ba1fd1ebd1ca692ca590226cd573 Mon Sep 17 00:00:00 2001 From: Don Lewis Date: Sun, 7 Dec 2003 21:53:41 +0000 Subject: [PATCH] Pass MTX_DEF as the last argument to mtx_init() instead of 0. This is not a functional change. The code happened to work properly only because MTX_DEF is defined as 0. --- sys/kern/subr_mbpool.c | 2 +- sys/kern/subr_mbuf.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/subr_mbpool.c b/sys/kern/subr_mbpool.c index 02c25e8f626..9ca51991d05 100644 --- a/sys/kern/subr_mbpool.c +++ b/sys/kern/subr_mbpool.c @@ -138,7 +138,7 @@ mbp_create(struct mbpool **pp, const char *name, bus_dma_tag_t dmat, (*pp)->nchunks = nchunks; SLIST_INIT(&(*pp)->free_list); - mtx_init(&(*pp)->free_lock, name, NULL, 0); + mtx_init(&(*pp)->free_lock, name, NULL, MTX_DEF); return (0); } diff --git a/sys/kern/subr_mbuf.c b/sys/kern/subr_mbuf.c index cb930a2bba7..2743cb7eb22 100644 --- a/sys/kern/subr_mbuf.c +++ b/sys/kern/subr_mbuf.c @@ -426,7 +426,7 @@ mbuf_init(void *dummy) /* * Initialize condition variables and general container mutex locks. */ - mtx_init(&mbuf_gen, "mbuf subsystem general lists lock", NULL, 0); + mtx_init(&mbuf_gen, "mbuf subsystem general lists lock", NULL, MTX_DEF); cv_init(&(mb_list_mbuf.ml_genlist->mgl_mstarved), "mbuf pool starved"); cv_init(&(mb_list_clust.ml_genlist->mgl_mstarved), "mcluster pool starved"); @@ -491,7 +491,7 @@ mbuf_init(void *dummy) (mb_list_clust.ml_cntlst[i] == NULL)) goto bad; - mtx_init(&mbuf_pcpu[i], "mbuf PCPU list lock", NULL, 0); + mtx_init(&mbuf_pcpu[i], "mbuf PCPU list lock", NULL, MTX_DEF); mb_list_mbuf.ml_cntlst[i]->mb_cont.mc_lock = mb_list_clust.ml_cntlst[i]->mb_cont.mc_lock = &mbuf_pcpu[i];