| /freebsd-14-stable/sys/dev/hid/ |
| HD | hidraw.c | 91 struct mtx sc_mtx; /* hidbus private mutex */ member 221 mtx_init(&sc->sc_mtx, "hidraw lock", NULL, MTX_DEF); in hidraw_attach() 222 knlist_init_mtx(&sc->sc_rsel.si_note, &sc->sc_mtx); in hidraw_attach() 242 hidbus_set_lock(self, &sc->sc_mtx); in hidraw_attach() 256 mtx_lock(&sc->sc_mtx); in hidraw_detach() 260 mtx_unlock(&sc->sc_mtx); in hidraw_detach() 267 mtx_destroy(&sc->sc_mtx); in hidraw_detach() 303 mtx_assert(&sc->sc_mtx, MA_OWNED); in hidraw_lock_queue() 315 error = mtx_sleep(&sc->sc_sleepcnt, &sc->sc_mtx, in hidraw_lock_queue() 331 mtx_assert(&sc->sc_mtx, MA_OWNED); in hidraw_unlock_queue() [all …]
|
| /freebsd-14-stable/sys/arm/ti/ |
| HD | ti_adcvar.h | 39 struct mtx sc_mtx; member 74 mtx_lock(&(_sc)->sc_mtx) 76 mtx_unlock(&(_sc)->sc_mtx) 78 mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->sc_dev), \ 81 mtx_destroy(&_sc->sc_mtx); 83 mtx_assert(&(_sc)->sc_mtx, MA_OWNED)
|
| /freebsd-14-stable/sys/arm/freescale/imx/ |
| HD | imx_gpio.c | 117 struct mtx sc_mtx; member 308 mtx_lock_spin(&sc->sc_mtx); in gpio_pic_teardown_intr() 311 mtx_unlock_spin(&sc->sc_mtx); in gpio_pic_teardown_intr() 350 mtx_lock_spin(&sc->sc_mtx); in gpio_pic_setup_intr() 386 mtx_unlock_spin(&sc->sc_mtx); in gpio_pic_setup_intr() 403 mtx_lock_spin(&sc->sc_mtx); in gpio_pic_disable_intr() 405 mtx_unlock_spin(&sc->sc_mtx); in gpio_pic_disable_intr() 420 mtx_lock_spin(&sc->sc_mtx); in gpio_pic_enable_intr() 422 mtx_unlock_spin(&sc->sc_mtx); in gpio_pic_enable_intr() 468 mtx_lock_spin(&sc->sc_mtx); in gpio_pic_filter() [all …]
|
| /freebsd-14-stable/sys/dev/gpio/ |
| HD | qoriq_gpio.h | 37 #define GPIO_LOCK(sc) mtx_lock_spin(&(sc)->sc_mtx) 38 #define GPIO_UNLOCK(sc) mtx_unlock_spin(&(sc)->sc_mtx) 40 mtx_init(&(sc)->sc_mtx, device_get_nameunit((sc)->dev), \ 42 #define GPIO_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); 55 struct mtx sc_mtx; member
|
| HD | gpiobusvar.h | 56 #define GPIOBUS_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) 57 #define GPIOBUS_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) 58 #define GPIOBUS_LOCK_INIT(_sc) mtx_init(&_sc->sc_mtx, \ 60 #define GPIOBUS_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx) 61 #define GPIOBUS_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED) 62 #define GPIOBUS_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED) 87 struct mtx sc_mtx; /* bus mutex */ member
|
| /freebsd-14-stable/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() 437 mtx_lock(&sc->sc_mtx); in unlpt_open() 439 mtx_unlock(&sc->sc_mtx); in unlpt_open() 450 mtx_lock(&sc->sc_mtx); in unlpt_open() 452 mtx_unlock(&sc->sc_mtx); in unlpt_open() 544 mtx_init(&sc->sc_mtx, "ulpt lock", NULL, MTX_DEF | MTX_RECURSE); in ulpt_attach() [all …]
|
| /freebsd-14-stable/sys/dev/mmcnull/ |
| HD | mmcnull.c | 49 struct mtx sc_mtx; member 108 mtx_init(&sc->sc_mtx, "mmcnullmtx", NULL, MTX_DEF); in mmcnull_attach() 118 device_get_unit(dev), &sc->sc_mtx, 1, 1, in mmcnull_attach() 127 mtx_lock(&sc->sc_mtx); in mmcnull_attach() 133 mtx_unlock(&sc->sc_mtx); in mmcnull_attach() 136 mtx_unlock(&sc->sc_mtx); in mmcnull_attach() 138 callout_init_mtx(&sc->tick, &sc->sc_mtx, 0); /* Callout to emulate interrupts */ in mmcnull_attach() 156 mtx_lock(&sc->sc_mtx); in mmcnull_detach() 159 mtx_unlock(&sc->sc_mtx); in mmcnull_detach() 166 mtx_destroy(&sc->sc_mtx); in mmcnull_detach() [all …]
|
| /freebsd-14-stable/sys/dev/le/ |
| HD | lancevar.h | 42 struct mtx sc_mtx; member 119 mtx_init(&(_sc)->sc_mtx, _name, MTX_NETWORK_LOCK, MTX_DEF) 120 #define LE_LOCK_INITIALIZED(_sc) mtx_initialized(&(_sc)->sc_mtx) 121 #define LE_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) 122 #define LE_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) 123 #define LE_LOCK_ASSERT(_sc, _what) mtx_assert(&(_sc)->sc_mtx, (_what)) 124 #define LE_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx)
|
| /freebsd-14-stable/sys/dev/etherswitch/ip17x/ |
| HD | ip17x_var.h | 61 struct mtx sc_mtx; /* serialize access to softc */ member 81 mtx_lock(&(_sc)->sc_mtx) 83 mtx_unlock(&(_sc)->sc_mtx) 85 mtx_assert(&(_sc)->sc_mtx, (_what)) 87 mtx_trylock(&(_sc)->sc_mtx)
|
| /freebsd-14-stable/sys/geom/mountver/ |
| HD | g_mountver.c | 125 mtx_lock(&sc->sc_mtx); in g_mountver_done() 128 mtx_unlock(&sc->sc_mtx); in g_mountver_done() 142 mtx_assert(&sc->sc_mtx, MA_OWNED); in g_mountver_send() 145 mtx_unlock(&sc->sc_mtx); in g_mountver_send() 151 mtx_unlock(&sc->sc_mtx); in g_mountver_send() 166 mtx_lock(&sc->sc_mtx); in g_mountver_queue() 168 mtx_unlock(&sc->sc_mtx); in g_mountver_queue() 179 mtx_lock(&sc->sc_mtx); in g_mountver_send_queued() 185 mtx_lock(&sc->sc_mtx); in g_mountver_send_queued() 187 mtx_unlock(&sc->sc_mtx); in g_mountver_send_queued() [all …]
|
| /freebsd-14-stable/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()
|
| /freebsd-14-stable/sys/dev/usb/misc/ |
| HD | uled.c | 61 struct mtx sc_mtx; member 151 mtx_init(&sc->sc_mtx, "uled lock", NULL, MTX_DEF | MTX_RECURSE); in uled_attach() 155 error = usb_fifo_attach(uaa->device, sc, &sc->sc_mtx, in uled_attach() 179 mtx_destroy(&sc->sc_mtx); in uled_detach() 195 return (usbd_do_request_flags(sc->sc_udev, &sc->sc_mtx, &req, buf, in uled_ctrl_msg() 208 mtx_lock(&sc->sc_mtx); in uled_enable() 211 mtx_unlock(&sc->sc_mtx); in uled_enable() 252 mtx_lock(&sc->sc_mtx); in uled_ioctl() 289 mtx_unlock(&sc->sc_mtx); in uled_ioctl()
|
| HD | udbp.c | 115 struct mtx sc_mtx; member 326 mtx_init(&sc->sc_mtx, "udbp lock", NULL, MTX_DEF | MTX_RECURSE); in udbp_attach() 329 sc->sc_xfer, udbp_config, UDBP_T_MAX, sc, &sc->sc_mtx); in udbp_attach() 382 mtx_destroy(&sc->sc_mtx); in udbp_detach() 479 mtx_lock(&sc->sc_mtx); in udbp_bulk_read_complete() 505 mtx_unlock(&sc->sc_mtx); in udbp_bulk_read_complete() 611 mtx_lock(&sc->sc_mtx); in ng_udbp_newhook() 620 mtx_unlock(&sc->sc_mtx); in ng_udbp_newhook() 659 mtx_lock(&sc->sc_mtx); in ng_udbp_rcvmsg() 662 mtx_unlock(&sc->sc_mtx); in ng_udbp_rcvmsg() [all …]
|
| HD | ugold.c | 101 struct mtx sc_mtx; member 207 mtx_init(&sc->sc_mtx, "ugold lock", NULL, MTX_DEF | MTX_RECURSE); in ugold_attach() 208 callout_init_mtx(&sc->sc_callout, &sc->sc_mtx, 0); in ugold_attach() 233 UGOLD_N_TRANSFER, sc, &sc->sc_mtx); in ugold_attach() 275 mtx_lock(&sc->sc_mtx); in ugold_attach() 278 mtx_unlock(&sc->sc_mtx); in ugold_attach() 302 mtx_destroy(&sc->sc_mtx); in ugold_detach() 383 return (usbd_req_set_report(sc->sc_udev, &sc->sc_mtx, cmd, len, in ugold_issue_cmd() 394 mtx_lock(&sc->sc_mtx); in ugold_readout_msg() 399 mtx_unlock(&sc->sc_mtx); in ugold_readout_msg()
|
| /freebsd-14-stable/sys/dev/adb/ |
| HD | adb_mouse.c | 72 struct mtx sc_mtx; member 156 mtx_init(&sc->sc_mtx, "ams", NULL, MTX_DEF); in adb_mouse_attach() 263 mtx_destroy(&sc->sc_mtx); in adb_mouse_detach() 411 mtx_lock(&sc->sc_mtx); in adb_mouse_receive_packet() 421 mtx_unlock(&sc->sc_mtx); in adb_mouse_receive_packet() 438 mtx_lock(&sc->sc_mtx); in ams_open() 443 mtx_unlock(&sc->sc_mtx); in ams_open() 470 mtx_lock(&sc->sc_mtx); in ams_poll() 481 mtx_unlock(&sc->sc_mtx); in ams_poll() 502 mtx_lock(&sc->sc_mtx); in ams_read() [all …]
|
| /freebsd-14-stable/sys/dev/usb/net/ |
| HD | if_urndisreg.h | 39 struct mtx sc_mtx; member 52 #define URNDIS_LOCK(sc) mtx_lock(&(sc)->sc_mtx) 53 #define URNDIS_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) 54 #define URNDIS_LOCK_ASSERT(sc, what) mtx_assert(&(sc)->sc_mtx, (what))
|
| HD | if_iphethvar.h | 70 struct mtx sc_mtx; member 81 #define IPHETH_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) 82 #define IPHETH_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) 83 #define IPHETH_LOCK_ASSERT(_sc, t) mtx_assert(&(_sc)->sc_mtx, t)
|
| HD | if_usie.c | 310 mtx_init(&sc->sc_mtx, "usie", MTX_NETWORK_LOCK, MTX_DEF); in usie_attach() 316 usb_callout_init_mtx(&sc->sc_if_sync_ch, &sc->sc_mtx, 0); in usie_attach() 318 mtx_lock(&sc->sc_mtx); in usie_attach() 327 mtx_unlock(&sc->sc_mtx); in usie_attach() 338 mtx_unlock(&sc->sc_mtx); in usie_attach() 341 mtx_unlock(&sc->sc_mtx); in usie_attach() 370 USIE_IF_N_XFER, sc, &sc->sc_mtx); in usie_attach() 401 &sc->sc_ucom[sc->sc_nucom], &sc->sc_mtx); in usie_attach() 408 mtx_lock(&sc->sc_mtx); in usie_attach() 411 mtx_unlock(&sc->sc_mtx); in usie_attach() [all …]
|
| HD | if_cuereg.h | 123 struct mtx sc_mtx; member 130 #define CUE_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) 131 #define CUE_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) 132 #define CUE_LOCK_ASSERT(_sc, t) mtx_assert(&(_sc)->sc_mtx, t)
|
| /freebsd-14-stable/sys/geom/ |
| HD | geom_vfs.c | 52 struct mtx sc_mtx; member 167 mtx_lock(&sc->sc_mtx); in g_vfs_done() 174 mtx_unlock(&sc->sc_mtx); in g_vfs_done() 194 mtx_lock(&sc->sc_mtx); in g_vfs_strategy() 196 mtx_unlock(&sc->sc_mtx); in g_vfs_strategy() 203 mtx_unlock(&sc->sc_mtx); in g_vfs_strategy() 241 mtx_lock(&sc->sc_mtx); in g_vfs_orphan() 249 mtx_unlock(&sc->sc_mtx); in g_vfs_orphan() 282 mtx_init(&sc->sc_mtx, "g_vfs", NULL, MTX_DEF); in g_vfs_open() 320 mtx_destroy(&sc->sc_mtx); in g_vfs_close()
|
| /freebsd-14-stable/sys/dev/usb/gadget/ |
| HD | g_mouse.c | 108 struct mtx sc_mtx; member 282 mtx_init(&sc->sc_mtx, "g_mouse", NULL, MTX_DEF); in g_mouse_attach() 284 usb_callout_init_mtx(&sc->sc_button_press_callout, &sc->sc_mtx, 0); in g_mouse_attach() 285 usb_callout_init_mtx(&sc->sc_cursor_update_callout, &sc->sc_mtx, 0); in g_mouse_attach() 291 G_MOUSE_N_TRANSFER, sc, &sc->sc_mtx); in g_mouse_attach() 298 mtx_lock(&sc->sc_mtx); in g_mouse_attach() 301 mtx_unlock(&sc->sc_mtx); in g_mouse_attach() 318 mtx_lock(&sc->sc_mtx); in g_mouse_detach() 321 mtx_unlock(&sc->sc_mtx); in g_mouse_detach() 328 mtx_destroy(&sc->sc_mtx); in g_mouse_detach()
|
| /freebsd-14-stable/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()
|
| /freebsd-14-stable/sys/dev/iwi/ |
| HD | if_iwivar.h | 130 struct mtx sc_mtx; member 250 mtx_init(&(sc)->sc_mtx, device_get_nameunit((sc)->sc_dev), \ 252 #define IWI_LOCK_DESTROY(sc) mtx_destroy(&(sc)->sc_mtx) 254 #define IWI_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) 256 if (!(__waslocked = mtx_owned(&(sc)->sc_mtx))) \ 257 mtx_lock(&(sc)->sc_mtx); \ 261 mtx_unlock(&(sc)->sc_mtx); \
|
| /freebsd-14-stable/sys/dev/amdgpio/ |
| HD | amdgpio.h | 302 mtx_init(&_sc->sc_mtx, device_get_nameunit((_sc)->sc_dev), \ 304 #define AMDGPIO_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) 305 #define AMDGPIO_LOCK(_sc) mtx_lock_spin(&(_sc)->sc_mtx) 306 #define AMDGPIO_UNLOCK(_sc) mtx_unlock_spin(&(_sc)->sc_mtx) 307 #define AMDGPIO_ASSERT_LOCKED(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) 308 #define AMDGPIO_ASSERT_UNLOCKED(_sc) mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED) 318 struct mtx sc_mtx; member
|
| /freebsd-14-stable/sys/dev/usb/wlan/ |
| HD | if_rumvar.h | 128 struct mtx sc_mtx; member 174 mtx_init(&(sc)->sc_mtx, device_get_nameunit((sc)->sc_dev), \ 176 #define RUM_LOCK(sc) mtx_lock(&(sc)->sc_mtx) 177 #define RUM_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) 178 #define RUM_LOCK_ASSERT(sc) mtx_assert(&(sc)->sc_mtx, MA_OWNED) 179 #define RUM_LOCK_DESTROY(sc) mtx_destroy(&(sc)->sc_mtx)
|