diff options
author | attilio <attilio@FreeBSD.org> | 2008-01-24 12:34:30 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2008-01-24 12:34:30 +0000 |
commit | 7213f4c32b94b60add6400f4213c1ca347bd609f (patch) | |
tree | c29223c268b9510bd1f4bee082ad1de97c817c24 /sys/dev/usb | |
parent | 5671b69e5898140ead9c08fe7f302dde1d680c63 (diff) | |
download | FreeBSD-src-7213f4c32b94b60add6400f4213c1ca347bd609f.zip FreeBSD-src-7213f4c32b94b60add6400f4213c1ca347bd609f.tar.gz |
Cleanup lockmgr interface and exported KPI:
- Remove the "thread" argument from the lockmgr() function as it is
always curthread now
- Axe lockcount() function as it is no longer used
- Axe LOCKMGR_ASSERT() as it is bogus really and no currently used.
Hopefully this will be soonly replaced by something suitable for it.
- Remove the prototype for dumplockinfo() as the function is no longer
present
Addictionally:
- Introduce a KASSERT() in lockstatus() in order to let it accept only
curthread or NULL as they should only be passed
- Do a little bit of style(9) cleanup on lockmgr.h
KPI results heavilly broken by this change, so manpages and
FreeBSD_version will be modified accordingly by further commits.
Tested by: matteo
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/ehci.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/if_udav.c | 8 |
2 files changed, 2 insertions, 10 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index 127d0f7..bd41432 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -1560,7 +1560,7 @@ ehci_sync_hc(ehci_softc_t *sc) } DPRINTFN(2,("ehci_sync_hc: enter\n")); /* get doorbell */ - lockmgr(&sc->sc_doorbell_lock, LK_EXCLUSIVE, NULL, curthread); + lockmgr(&sc->sc_doorbell_lock, LK_EXCLUSIVE, NULL); s = splhardusb(); /* ask for doorbell */ EOWRITE4(sc, EHCI_USBCMD, EOREAD4(sc, EHCI_USBCMD) | EHCI_CMD_IAAD); @@ -1571,7 +1571,7 @@ ehci_sync_hc(ehci_softc_t *sc) EOREAD4(sc, EHCI_USBCMD), EOREAD4(sc, EHCI_USBSTS))); splx(s); /* release doorbell */ - lockmgr(&sc->sc_doorbell_lock, LK_RELEASE, NULL, curthread); + lockmgr(&sc->sc_doorbell_lock, LK_RELEASE, NULL); #ifdef DIAGNOSTIC if (error) printf("ehci_sync_hc: tsleep() = %d\n", error); diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c index 869132c..e86f2c7 100644 --- a/sys/dev/usb/if_udav.c +++ b/sys/dev/usb/if_udav.c @@ -1777,11 +1777,7 @@ udav_lock_mii(struct udav_softc *sc) __func__)); sc->sc_refcnt++; -#if defined(__NetBSD__) lockmgr(&sc->sc_mii_lock, LK_EXCLUSIVE, NULL); -#elif defined(__FreeBSD__) - lockmgr(&sc->sc_mii_lock, LK_EXCLUSIVE, NULL, curthread); -#endif } static void @@ -1790,11 +1786,7 @@ udav_unlock_mii(struct udav_softc *sc) DPRINTFN(0xff, ("%s: %s: enter\n", device_get_nameunit(sc->sc_dev), __func__)); -#if defined(__NetBSD__) lockmgr(&sc->sc_mii_lock, LK_RELEASE, NULL); -#elif defined(__FreeBSD__) - lockmgr(&sc->sc_mii_lock, LK_RELEASE, NULL, curthread); -#endif if (--sc->sc_refcnt < 0) usb_detach_wakeup(sc->sc_dev); } |