summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/if_kue.c
diff options
context:
space:
mode:
authorbmilekic <bmilekic@FreeBSD.org>2001-01-19 01:59:14 +0000
committerbmilekic <bmilekic@FreeBSD.org>2001-01-19 01:59:14 +0000
commit37decc93f5a2dfb49438d1e77245218780583ef6 (patch)
tree2e4b859fb1993ec2fe69e3e946d14a9fdc9cf441 /sys/dev/usb/if_kue.c
parent5977e97236d57a51dc2ddf0634bb4a69d30dc36f (diff)
downloadFreeBSD-src-37decc93f5a2dfb49438d1e77245218780583ef6.zip
FreeBSD-src-37decc93f5a2dfb49438d1e77245218780583ef6.tar.gz
Implement MTX_RECURSE flag for mtx_init().
All calls to mtx_init() for mutexes that recurse must now include the MTX_RECURSE bit in the flag argument variable. This change is in preparation for an upcoming (further) mutex API cleanup. The witness code will call panic() if a lock is found to recurse but the MTX_RECURSE bit was not set during the lock's initialization. The old MTX_RECURSE "state" bit (in mtx_lock) has been renamed to MTX_RECURSED, which is more appropriate given its meaning. The following locks have been made "recursive," thus far: eventhandler, Giant, callout, sched_lock, possibly some others declared in the architecture-specific code, all of the network card driver locks in pci/, as well as some other locks in dev/ stuff that I've found to be recursive. Reviewed by: jhb
Diffstat (limited to 'sys/dev/usb/if_kue.c')
-rw-r--r--sys/dev/usb/if_kue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c
index f3a5581..4d89b70 100644
--- a/sys/dev/usb/if_kue.c
+++ b/sys/dev/usb/if_kue.c
@@ -450,7 +450,8 @@ USB_ATTACH(kue)
}
}
- mtx_init(&sc->kue_mtx, device_get_nameunit(self), MTX_DEF);
+ mtx_init(&sc->kue_mtx, device_get_nameunit(self), MTX_DEF |
+ MTX_RECURSE);
KUE_LOCK(sc);
/* Load the firmware into the NIC. */
OpenPOWER on IntegriCloud