Home
last modified time | relevance | path

Searched refs:sc_mtx (Results 1 – 25 of 268) sorted by relevance

1234567891011

/freebsd/sys/dev/hid/
H A Dhidraw.c91 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/sys/arm/ti/
H A Dti_adcvar.h39 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/sys/arm/freescale/imx/
H A Dimx_gpio.c117 struct mtx sc_mtx; member
309 mtx_lock_spin(&sc->sc_mtx); in gpio_pic_teardown_intr()
312 mtx_unlock_spin(&sc->sc_mtx); in gpio_pic_teardown_intr()
351 mtx_lock_spin(&sc->sc_mtx); in gpio_pic_setup_intr()
387 mtx_unlock_spin(&sc->sc_mtx); in gpio_pic_setup_intr()
404 mtx_lock_spin(&sc->sc_mtx); in gpio_pic_disable_intr()
406 mtx_unlock_spin(&sc->sc_mtx); in gpio_pic_disable_intr()
421 mtx_lock_spin(&sc->sc_mtx); in gpio_pic_enable_intr()
423 mtx_unlock_spin(&sc->sc_mtx); in gpio_pic_enable_intr()
469 mtx_lock_spin(&sc->sc_mtx); in gpio_pic_filter()
[all …]
/freebsd/sys/dev/usb/serial/
H A Dulpt.c106 struct mtx sc_mtx; member
185 mtx_lock(&sc->sc_mtx); in ulpt_reset()
187 if (usbd_do_request_flags(sc->sc_udev, &sc->sc_mtx, in ulpt_reset()
190 if (usbd_do_request_flags(sc->sc_udev, &sc->sc_mtx, in ulpt_reset()
195 mtx_unlock(&sc->sc_mtx); in ulpt_reset()
438 mtx_lock(&sc->sc_mtx); in unlpt_open()
440 mtx_unlock(&sc->sc_mtx); in unlpt_open()
451 mtx_lock(&sc->sc_mtx); in unlpt_open()
453 mtx_unlock(&sc->sc_mtx); in unlpt_open()
545 mtx_init(&sc->sc_mtx, "ulpt lock", NULL, MTX_DEF | MTX_RECURSE); in ulpt_attach()
[all …]
/freebsd/sys/dev/gpio/
H A Dqoriq_gpio.h37 #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
H A Dgpiobusvar.h56 #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
H A Dgpioled.c52 #define GPIOLED_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx)
53 #define GPIOLED_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx)
54 #define GPIOLED_LOCK_INIT(_sc) mtx_init(&(_sc)->sc_mtx, \
56 #define GPIOLED_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx)
62 struct mtx sc_mtx; member
/freebsd/sys/dev/mmcnull/
H A Dmmcnull.c48 struct mtx sc_mtx; member
107 mtx_init(&sc->sc_mtx, "mmcnullmtx", NULL, MTX_DEF); in mmcnull_attach()
117 device_get_unit(dev), &sc->sc_mtx, 1, 1, in mmcnull_attach()
126 mtx_lock(&sc->sc_mtx); in mmcnull_attach()
132 mtx_unlock(&sc->sc_mtx); in mmcnull_attach()
135 mtx_unlock(&sc->sc_mtx); in mmcnull_attach()
137 callout_init_mtx(&sc->tick, &sc->sc_mtx, 0); /* Callout to emulate interrupts */ in mmcnull_attach()
155 mtx_lock(&sc->sc_mtx); in mmcnull_detach()
158 mtx_unlock(&sc->sc_mtx); in mmcnull_detach()
165 mtx_destroy(&sc->sc_mtx); in mmcnull_detach()
[all …]
/freebsd/sys/dev/le/
H A Dlancevar.h42 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/sys/dev/etherswitch/ip17x/
H A Dip17x_var.h61 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/sys/geom/mountver/
H A Dg_mountver.c125 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/sys/powerpc/mambo/
H A Dmambo_disk.c45 struct mtx sc_mtx; member
72 #define MBODISK_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx)
73 #define MBODISK_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx)
75 mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->dev), \
77 #define MBODISK_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx);
78 #define MBODISK_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED);
79 #define MBODISK_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED);
156 msleep(sc, &sc->sc_mtx, PRIBIO, "detach", 0); in mambodisk_detach()
211 msleep(sc, &sc->sc_mtx, PRIBIO, "jobqueue", 0); in mambodisk_task()
/freebsd/sys/dev/usb/misc/
H A Duled.c62 struct mtx sc_mtx; member
152 mtx_init(&sc->sc_mtx, "uled lock", NULL, MTX_DEF | MTX_RECURSE); in uled_attach()
156 error = usb_fifo_attach(uaa->device, sc, &sc->sc_mtx, in uled_attach()
180 mtx_destroy(&sc->sc_mtx); in uled_detach()
196 return (usbd_do_request_flags(sc->sc_udev, &sc->sc_mtx, &req, buf, in uled_ctrl_msg()
209 mtx_lock(&sc->sc_mtx); in uled_enable()
212 mtx_unlock(&sc->sc_mtx); in uled_enable()
253 mtx_lock(&sc->sc_mtx); in uled_ioctl()
290 mtx_unlock(&sc->sc_mtx); in uled_ioctl()
H A Dudbp.c116 struct mtx sc_mtx; member
327 mtx_init(&sc->sc_mtx, "udbp lock", NULL, MTX_DEF | MTX_RECURSE); in udbp_attach()
330 sc->sc_xfer, udbp_config, UDBP_T_MAX, sc, &sc->sc_mtx); in udbp_attach()
383 mtx_destroy(&sc->sc_mtx); in udbp_detach()
480 mtx_lock(&sc->sc_mtx); in udbp_bulk_read_complete()
506 mtx_unlock(&sc->sc_mtx); in udbp_bulk_read_complete()
612 mtx_lock(&sc->sc_mtx); in ng_udbp_newhook()
621 mtx_unlock(&sc->sc_mtx); in ng_udbp_newhook()
660 mtx_lock(&sc->sc_mtx); in ng_udbp_rcvmsg()
663 mtx_unlock(&sc->sc_mtx); in ng_udbp_rcvmsg()
[all …]
H A Dugold.c102 struct mtx sc_mtx; member
208 mtx_init(&sc->sc_mtx, "ugold lock", NULL, MTX_DEF | MTX_RECURSE); in ugold_attach()
209 callout_init_mtx(&sc->sc_callout, &sc->sc_mtx, 0); in ugold_attach()
234 UGOLD_N_TRANSFER, sc, &sc->sc_mtx); in ugold_attach()
276 mtx_lock(&sc->sc_mtx); in ugold_attach()
279 mtx_unlock(&sc->sc_mtx); in ugold_attach()
303 mtx_destroy(&sc->sc_mtx); in ugold_detach()
384 return (usbd_req_set_report(sc->sc_udev, &sc->sc_mtx, cmd, len, in ugold_issue_cmd()
395 mtx_lock(&sc->sc_mtx); in ugold_readout_msg()
400 mtx_unlock(&sc->sc_mtx); in ugold_readout_msg()
/freebsd/sys/dev/adb/
H A Dadb_mouse.c71 struct mtx sc_mtx; member
155 mtx_init(&sc->sc_mtx, "ams", NULL, MTX_DEF); in adb_mouse_attach()
262 mtx_destroy(&sc->sc_mtx); in adb_mouse_detach()
410 mtx_lock(&sc->sc_mtx); in adb_mouse_receive_packet()
420 mtx_unlock(&sc->sc_mtx); in adb_mouse_receive_packet()
437 mtx_lock(&sc->sc_mtx); in ams_open()
442 mtx_unlock(&sc->sc_mtx); in ams_open()
469 mtx_lock(&sc->sc_mtx); in ams_poll()
480 mtx_unlock(&sc->sc_mtx); in ams_poll()
501 mtx_lock(&sc->sc_mtx); in ams_read()
[all …]
/freebsd/sys/dev/usb/net/
H A Dif_urndisreg.h39 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))
H A Dif_iphethvar.h70 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)
H A Dif_usie.c311 mtx_init(&sc->sc_mtx, "usie", MTX_NETWORK_LOCK, MTX_DEF); in usie_attach()
317 usb_callout_init_mtx(&sc->sc_if_sync_ch, &sc->sc_mtx, 0); in usie_attach()
319 mtx_lock(&sc->sc_mtx); in usie_attach()
328 mtx_unlock(&sc->sc_mtx); in usie_attach()
339 mtx_unlock(&sc->sc_mtx); in usie_attach()
342 mtx_unlock(&sc->sc_mtx); in usie_attach()
371 USIE_IF_N_XFER, sc, &sc->sc_mtx); in usie_attach()
402 &sc->sc_ucom[sc->sc_nucom], &sc->sc_mtx); in usie_attach()
409 mtx_lock(&sc->sc_mtx); in usie_attach()
412 mtx_unlock(&sc->sc_mtx); in usie_attach()
[all …]
H A Dif_cuereg.h123 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/sys/dev/usb/gadget/
H A Dg_mouse.c108 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/sys/powerpc/mpc85xx/
H A Dds1553_core.c52 if (mtx_initialized(&sc->sc_mtx) == 0) { in ds1553_attach()
64 mtx_lock_spin(&sc->sc_mtx); in ds1553_attach()
78 mtx_unlock_spin(&sc->sc_mtx); in ds1553_attach()
96 mtx_lock_spin(&sc->sc_mtx); in ds1553_gettime()
121 mtx_unlock_spin(&sc->sc_mtx); in ds1553_gettime()
148 mtx_lock_spin(&sc->sc_mtx); in ds1553_settime()
172 mtx_unlock_spin(&sc->sc_mtx); in ds1553_settime()
/freebsd/sys/dev/amdgpio/
H A Damdgpio.h302 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/sys/dev/iwi/
H A Dif_iwivar.h130 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/sys/dev/usb/wlan/
H A Dif_rumvar.h128 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)

1234567891011