| /NextBSD/sys/arm/freescale/imx/ |
| HD | imx_gpio.c | 97 struct mtx sc_mtx; member 161 mtx_lock_spin(&sc->sc_mtx); in gpio_pic_disable_intr() 164 mtx_unlock_spin(&sc->sc_mtx); in gpio_pic_disable_intr() 177 mtx_lock_spin(&sc->sc_mtx); in gpio_pic_disable_source() 179 mtx_unlock_spin(&sc->sc_mtx); in gpio_pic_disable_source() 215 mtx_lock_spin(&sc->sc_mtx); in gpio_pic_enable_intr() 222 mtx_unlock_spin(&sc->sc_mtx); in gpio_pic_enable_intr() 235 mtx_lock_spin(&sc->sc_mtx); in gpio_pic_enable_source() 237 mtx_unlock_spin(&sc->sc_mtx); in gpio_pic_enable_source() 331 mtx_lock_spin(&sc->sc_mtx); in gpio_pic_register() [all …]
|
| /NextBSD/sys/net/ |
| HD | if_bridgevar.h | 273 mtx_init(&(_sc)->sc_mtx, "if_bridge", NULL, MTX_DEF); \ 277 mtx_destroy(&(_sc)->sc_mtx); \ 280 #define BRIDGE_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) 281 #define BRIDGE_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) 282 #define BRIDGE_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) 284 mtx_assert(&(_sc)->sc_mtx, MA_OWNED); \ 289 mtx_unlock(&(_sc)->sc_mtx); \ 292 mtx_lock(&(_sc)->sc_mtx); \ 296 mtx_unlock(&(_sc)->sc_mtx); \ 299 mtx_assert(&(_sc)->sc_mtx, MA_OWNED); \ [all …]
|
| HD | if_lagg.h | 223 struct rmlock sc_mtx; member 273 #define LAGG_LOCK_INIT(_sc) rm_init(&(_sc)->sc_mtx, "if_lagg rmlock") 274 #define LAGG_LOCK_DESTROY(_sc) rm_destroy(&(_sc)->sc_mtx) 275 #define LAGG_RLOCK(_sc, _p) rm_rlock(&(_sc)->sc_mtx, (_p)) 276 #define LAGG_WLOCK(_sc) rm_wlock(&(_sc)->sc_mtx) 277 #define LAGG_RUNLOCK(_sc, _p) rm_runlock(&(_sc)->sc_mtx, (_p)) 278 #define LAGG_WUNLOCK(_sc) rm_wunlock(&(_sc)->sc_mtx) 279 #define LAGG_RLOCK_ASSERT(_sc) rm_assert(&(_sc)->sc_mtx, RA_RLOCKED) 280 #define LAGG_WLOCK_ASSERT(_sc) rm_assert(&(_sc)->sc_mtx, RA_WLOCKED) 281 #define LAGG_UNLOCK_ASSERT(_sc) rm_assert(&(_sc)->sc_mtx, RA_UNLOCKED)
|
| /NextBSD/sys/arm/ti/ |
| HD | ti_adcvar.h | 41 struct mtx sc_mtx; member 58 mtx_lock(&(_sc)->sc_mtx) 60 mtx_unlock(&(_sc)->sc_mtx) 62 mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->sc_dev), \ 65 mtx_destroy(&_sc->sc_mtx); 67 mtx_assert(&(_sc)->sc_mtx, MA_OWNED)
|
| /NextBSD/sys/dev/mc146818/ |
| HD | mc146818.c | 58 if (mtx_initialized(&sc->sc_mtx) == 0) { in mc146818_attach() 79 mtx_lock_spin(&sc->sc_mtx); in mc146818_attach() 81 mtx_unlock_spin(&sc->sc_mtx); in mc146818_attach() 93 mtx_unlock_spin(&sc->sc_mtx); in mc146818_attach() 120 mtx_lock_spin(&sc->sc_mtx); in mc146818_gettime() 123 mtx_unlock_spin(&sc->sc_mtx); in mc146818_gettime() 147 mtx_unlock_spin(&sc->sc_mtx); in mc146818_gettime() 166 mtx_lock_spin(&sc->sc_mtx); in mc146818_getsecs() 169 mtx_unlock_spin(&sc->sc_mtx); in mc146818_getsecs() 172 mtx_unlock_spin(&sc->sc_mtx); in mc146818_getsecs() [all …]
|
| /NextBSD/sys/dev/gpio/ |
| HD | gpiobusvar.h | 52 #define GPIOBUS_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) 53 #define GPIOBUS_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) 54 #define GPIOBUS_LOCK_INIT(_sc) mtx_init(&_sc->sc_mtx, \ 56 #define GPIOBUS_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx) 57 #define GPIOBUS_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED) 58 #define GPIOBUS_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED) 71 struct mtx sc_mtx; /* bus mutex */ member
|
| /NextBSD/sys/dev/sn/ |
| HD | if_snvar.h | 35 struct mtx sc_mtx; member 73 #define SN_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) 74 #define SN_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) 76 mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->dev), \ 78 #define SN_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); 79 #define SN_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); 80 #define SN_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED);
|
| /NextBSD/sys/dev/usb/serial/ |
| HD | ulpt.c | 105 struct mtx sc_mtx; member 184 mtx_lock(&sc->sc_mtx); in ulpt_reset() 186 if (usbd_do_request_flags(sc->sc_udev, &sc->sc_mtx, in ulpt_reset() 189 if (usbd_do_request_flags(sc->sc_udev, &sc->sc_mtx, in ulpt_reset() 194 mtx_unlock(&sc->sc_mtx); in ulpt_reset() 439 mtx_lock(&sc->sc_mtx); in unlpt_open() 441 mtx_unlock(&sc->sc_mtx); in unlpt_open() 452 mtx_lock(&sc->sc_mtx); in unlpt_open() 454 mtx_unlock(&sc->sc_mtx); in unlpt_open() 539 mtx_init(&sc->sc_mtx, "ulpt lock", NULL, MTX_DEF | MTX_RECURSE); in ulpt_attach() [all …]
|
| /NextBSD/sys/dev/mk48txx/ |
| HD | mk48txx.c | 84 if (mtx_initialized(&sc->sc_mtx) == 0) { in mk48txx_attach() 110 mtx_lock(&sc->sc_mtx); in mk48txx_attach() 113 mtx_unlock(&sc->sc_mtx); in mk48txx_attach() 117 mtx_unlock(&sc->sc_mtx); in mk48txx_attach() 129 mtx_lock(&sc->sc_mtx); in mk48txx_attach() 135 mtx_unlock(&sc->sc_mtx); in mk48txx_attach() 168 mtx_lock(&sc->sc_mtx); in mk48txx_gettime() 208 mtx_unlock(&sc->sc_mtx); in mk48txx_gettime() 235 mtx_lock(&sc->sc_mtx); in mk48txx_settime() 270 mtx_unlock(&sc->sc_mtx); in mk48txx_settime() [all …]
|
| /NextBSD/sys/dev/usb/misc/ |
| HD | uled.c | 64 struct mtx sc_mtx; member 146 mtx_init(&sc->sc_mtx, "uled lock", NULL, MTX_DEF | MTX_RECURSE); in uled_attach() 150 error = usb_fifo_attach(uaa->device, sc, &sc->sc_mtx, in uled_attach() 174 mtx_destroy(&sc->sc_mtx); in uled_detach() 190 return (usbd_do_request_flags(sc->sc_udev, &sc->sc_mtx, &req, buf, in uled_ctrl_msg() 202 mtx_lock(&sc->sc_mtx); in uled_enable() 205 mtx_unlock(&sc->sc_mtx); in uled_enable() 246 mtx_lock(&sc->sc_mtx); in uled_ioctl() 274 mtx_unlock(&sc->sc_mtx); in uled_ioctl()
|
| HD | udbp.c | 117 struct mtx sc_mtx; member 329 mtx_init(&sc->sc_mtx, "udbp lock", NULL, MTX_DEF | MTX_RECURSE); in udbp_attach() 332 sc->sc_xfer, udbp_config, UDBP_T_MAX, sc, &sc->sc_mtx); in udbp_attach() 385 mtx_destroy(&sc->sc_mtx); in udbp_detach() 483 mtx_lock(&sc->sc_mtx); in udbp_bulk_read_complete() 510 mtx_unlock(&sc->sc_mtx); in udbp_bulk_read_complete() 617 mtx_lock(&sc->sc_mtx); in ng_udbp_newhook() 626 mtx_unlock(&sc->sc_mtx); in ng_udbp_newhook() 665 mtx_lock(&sc->sc_mtx); in ng_udbp_rcvmsg() 668 mtx_unlock(&sc->sc_mtx); in ng_udbp_rcvmsg() [all …]
|
| HD | ufm.c | 71 struct mtx sc_mtx; member 155 mtx_init(&sc->sc_mtx, "ufm lock", NULL, MTX_DEF | MTX_RECURSE); in ufm_attach() 159 error = usb_fifo_attach(uaa->device, sc, &sc->sc_mtx, in ufm_attach() 180 mtx_destroy(&sc->sc_mtx); in ufm_detach() 223 mtx_lock(&sc->sc_mtx); in ufm_set_freq() 225 mtx_unlock(&sc->sc_mtx); in ufm_set_freq() 247 mtx_lock(&sc->sc_mtx); in ufm_get_freq() 249 mtx_unlock(&sc->sc_mtx); in ufm_get_freq()
|
| HD | ugold.c | 102 struct mtx sc_mtx; member 210 mtx_init(&sc->sc_mtx, "ugold lock", NULL, MTX_DEF | MTX_RECURSE); in ugold_attach() 211 callout_init_mtx(&sc->sc_callout, &sc->sc_mtx, 0); in ugold_attach() 236 UGOLD_N_TRANSFER, sc, &sc->sc_mtx); in ugold_attach() 278 mtx_lock(&sc->sc_mtx); in ugold_attach() 281 mtx_unlock(&sc->sc_mtx); in ugold_attach() 305 mtx_destroy(&sc->sc_mtx); in ugold_detach() 387 return (usbd_req_set_report(sc->sc_udev, &sc->sc_mtx, cmd, len, in ugold_issue_cmd() 398 mtx_lock(&sc->sc_mtx); in ugold_readout_msg() 403 mtx_unlock(&sc->sc_mtx); in ugold_readout_msg()
|
| /NextBSD/sys/dev/le/ |
| HD | lancevar.h | 43 struct mtx sc_mtx; member 120 mtx_init(&(_sc)->sc_mtx, _name, MTX_NETWORK_LOCK, MTX_DEF) 121 #define LE_LOCK_INITIALIZED(_sc) mtx_initialized(&(_sc)->sc_mtx) 122 #define LE_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) 123 #define LE_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) 124 #define LE_LOCK_ASSERT(_sc, _what) mtx_assert(&(_sc)->sc_mtx, (_what)) 125 #define LE_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx)
|
| /NextBSD/sys/dev/ep/ |
| HD | if_epvar.h | 40 struct mtx sc_mtx; member 105 #define EP_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) 106 #define EP_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) 108 mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->dev), \ 110 #define EP_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); 111 #define EP_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); 112 #define EP_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED);
|
| /NextBSD/sys/geom/ |
| HD | geom_vfs.c | 51 struct mtx sc_mtx; member 151 mtx_lock(&sc->sc_mtx); in g_vfs_done() 153 mtx_unlock(&sc->sc_mtx); in g_vfs_done() 173 mtx_lock(&sc->sc_mtx); in g_vfs_strategy() 175 mtx_unlock(&sc->sc_mtx); in g_vfs_strategy() 182 mtx_unlock(&sc->sc_mtx); in g_vfs_strategy() 212 mtx_lock(&sc->sc_mtx); in g_vfs_orphan() 215 mtx_unlock(&sc->sc_mtx); in g_vfs_orphan() 246 mtx_init(&sc->sc_mtx, "g_vfs", NULL, MTX_DEF); in g_vfs_open() 280 mtx_destroy(&sc->sc_mtx); in g_vfs_close()
|
| /NextBSD/sys/powerpc/mambo/ |
| HD | mambo_disk.c | 46 struct mtx sc_mtx; member 73 #define MBODISK_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) 74 #define MBODISK_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) 76 mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->dev), \ 78 #define MBODISK_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); 79 #define MBODISK_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); 80 #define MBODISK_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); 157 msleep(sc, &sc->sc_mtx, PRIBIO, "detach", 0); in mambodisk_detach() 212 msleep(sc, &sc->sc_mtx, PRIBIO, "jobqueue", 0); in mambodisk_task()
|
| /NextBSD/sys/dev/etherswitch/ip17x/ |
| HD | ip17x_var.h | 60 struct mtx sc_mtx; /* serialize access to softc */ member 80 mtx_lock(&(_sc)->sc_mtx) 82 mtx_unlock(&(_sc)->sc_mtx) 84 mtx_assert(&(_sc)->sc_mtx, (_what)) 86 mtx_trylock(&(_sc)->sc_mtx)
|
| /NextBSD/sys/dev/adb/ |
| HD | adb_mouse.c | 70 struct mtx sc_mtx; member 157 mtx_init(&sc->sc_mtx, "ams", NULL, MTX_DEF); in adb_mouse_attach() 264 mtx_destroy(&sc->sc_mtx); in adb_mouse_detach() 412 mtx_lock(&sc->sc_mtx); in adb_mouse_receive_packet() 422 mtx_unlock(&sc->sc_mtx); in adb_mouse_receive_packet() 439 mtx_lock(&sc->sc_mtx); in ams_open() 444 mtx_unlock(&sc->sc_mtx); in ams_open() 471 mtx_lock(&sc->sc_mtx); in ams_poll() 482 mtx_unlock(&sc->sc_mtx); in ams_poll() 503 mtx_lock(&sc->sc_mtx); in ams_read() [all …]
|
| /NextBSD/sys/dev/usb/net/ |
| HD | if_usie.c | 309 mtx_init(&sc->sc_mtx, "usie", MTX_NETWORK_LOCK, MTX_DEF); in usie_attach() 315 usb_callout_init_mtx(&sc->sc_if_sync_ch, &sc->sc_mtx, 0); in usie_attach() 317 mtx_lock(&sc->sc_mtx); in usie_attach() 326 mtx_unlock(&sc->sc_mtx); in usie_attach() 337 mtx_unlock(&sc->sc_mtx); in usie_attach() 340 mtx_unlock(&sc->sc_mtx); in usie_attach() 369 USIE_IF_N_XFER, sc, &sc->sc_mtx); in usie_attach() 400 &sc->sc_ucom[sc->sc_nucom], &sc->sc_mtx); in usie_attach() 407 mtx_lock(&sc->sc_mtx); in usie_attach() 410 mtx_unlock(&sc->sc_mtx); in usie_attach() [all …]
|
| HD | if_iphethvar.h | 69 struct mtx sc_mtx; member 80 #define IPHETH_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) 81 #define IPHETH_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) 82 #define IPHETH_LOCK_ASSERT(_sc, t) mtx_assert(&(_sc)->sc_mtx, t)
|
| /NextBSD/sys/dev/usb/gadget/ |
| HD | g_mouse.c | 107 struct mtx sc_mtx; member 284 mtx_init(&sc->sc_mtx, "g_mouse", NULL, MTX_DEF); in g_mouse_attach() 286 usb_callout_init_mtx(&sc->sc_button_press_callout, &sc->sc_mtx, 0); in g_mouse_attach() 287 usb_callout_init_mtx(&sc->sc_cursor_update_callout, &sc->sc_mtx, 0); in g_mouse_attach() 293 G_MOUSE_N_TRANSFER, sc, &sc->sc_mtx); in g_mouse_attach() 300 mtx_lock(&sc->sc_mtx); in g_mouse_attach() 303 mtx_unlock(&sc->sc_mtx); in g_mouse_attach() 320 mtx_lock(&sc->sc_mtx); in g_mouse_detach() 323 mtx_unlock(&sc->sc_mtx); in g_mouse_detach() 330 mtx_destroy(&sc->sc_mtx); in g_mouse_detach()
|
| /NextBSD/sys/powerpc/mpc85xx/ |
| HD | ds1553_core.c | 53 if (mtx_initialized(&sc->sc_mtx) == 0) { in ds1553_attach() 65 mtx_lock_spin(&sc->sc_mtx); in ds1553_attach() 79 mtx_unlock_spin(&sc->sc_mtx); in ds1553_attach() 97 mtx_lock_spin(&sc->sc_mtx); in ds1553_gettime() 122 mtx_unlock_spin(&sc->sc_mtx); in ds1553_gettime() 149 mtx_lock_spin(&sc->sc_mtx); in ds1553_settime() 173 mtx_unlock_spin(&sc->sc_mtx); in ds1553_settime()
|
| /NextBSD/sys/dev/iwi/ |
| HD | if_iwivar.h | 128 struct mtx sc_mtx; member 248 mtx_init(&(sc)->sc_mtx, device_get_nameunit((sc)->sc_dev), \ 250 #define IWI_LOCK_DESTROY(sc) mtx_destroy(&(sc)->sc_mtx) 252 #define IWI_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) 254 if (!(__waslocked = mtx_owned(&(sc)->sc_mtx))) \ 255 mtx_lock(&(sc)->sc_mtx); \ 259 mtx_unlock(&(sc)->sc_mtx); \
|
| /NextBSD/sys/dev/usb/wlan/ |
| HD | if_rumvar.h | 125 struct mtx sc_mtx; member 166 mtx_init(&(sc)->sc_mtx, device_get_nameunit((sc)->sc_dev), \ 168 #define RUM_LOCK(sc) mtx_lock(&(sc)->sc_mtx) 169 #define RUM_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) 170 #define RUM_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) 171 #define RUM_LOCK_DESTROY(sc) mtx_destroy(&(sc)->sc_mtx)
|