Home
last modified time | relevance | path

Searched refs:mtx (Results 1 – 25 of 76) sorted by relevance

1234

/linux-6.15/tools/perf/util/
H A Dmutex.c37 void mutex_init(struct mutex *mtx) in mutex_init() argument
39 __mutex_init(mtx, /*pshared=*/false); in mutex_init()
42 void mutex_init_pshared(struct mutex *mtx) in mutex_init_pshared() argument
44 __mutex_init(mtx, /*pshared=*/true); in mutex_init_pshared()
47 void mutex_destroy(struct mutex *mtx) in mutex_destroy() argument
52 void mutex_lock(struct mutex *mtx) in mutex_lock() argument
55 CHECK_ERR(pthread_mutex_lock(&mtx->lock)); in mutex_lock()
58 void mutex_unlock(struct mutex *mtx) in mutex_unlock() argument
61 CHECK_ERR(pthread_mutex_unlock(&mtx->lock)); in mutex_unlock()
64 bool mutex_trylock(struct mutex *mtx) in mutex_trylock() argument
[all …]
H A Dmutex.h90 void mutex_init(struct mutex *mtx);
95 void mutex_init_pshared(struct mutex *mtx);
96 void mutex_destroy(struct mutex *mtx);
98 void mutex_lock(struct mutex *mtx) EXCLUSIVE_LOCK_FUNCTION(*mtx);
99 void mutex_unlock(struct mutex *mtx) UNLOCK_FUNCTION(*mtx);
101 bool mutex_trylock(struct mutex *mtx) EXCLUSIVE_TRYLOCK_FUNCTION(true, *mtx);
112 void cond_wait(struct cond *cnd, struct mutex *mtx) EXCLUSIVE_LOCKS_REQUIRED(mtx);
H A Drwsem.c12 mutex_init(&sem->mtx); in init_rwsem()
22 mutex_destroy(&sem->mtx); in exit_rwsem()
32 mutex_lock(&sem->mtx); in down_read()
42 mutex_unlock(&sem->mtx); in up_read()
52 mutex_lock(&sem->mtx); in down_write()
62 mutex_unlock(&sem->mtx); in up_write()
/linux-6.15/drivers/soc/mediatek/
H A Dmtk-mutex.c822 return &mtx->mutex[i]; in mtk_mutex_get()
909 mtx->regs + in mtk_mutex_add_comp()
934 mtx->regs + in mtk_mutex_remove_comp()
975 if (!mtx->cmdq_reg.size) { in mtk_mutex_enable_by_cmdq()
1097 mtx = devm_kzalloc(dev, sizeof(*mtx), GFP_KERNEL); in mtk_mutex_probe()
1098 if (!mtx) in mtk_mutex_probe()
1102 mtx->mutex[i].id = i; in mtk_mutex_probe()
1106 if (!mtx->data->no_clk) { in mtk_mutex_probe()
1108 if (IS_ERR(mtx->clk)) in mtk_mutex_probe()
1113 if (IS_ERR(mtx->regs)) { in mtk_mutex_probe()
[all …]
/linux-6.15/sound/aoa/codecs/
H A Dtas.c97 struct mutex mtx; member
238 mutex_lock(&tas->mtx); in tas_snd_vol_get()
257 mutex_lock(&tas->mtx); in tas_snd_vol_put()
288 mutex_lock(&tas->mtx); in tas_snd_mute_get()
300 mutex_lock(&tas->mtx); in tas_snd_mute_put()
340 mutex_lock(&tas->mtx); in tas_snd_mixer_get()
354 mutex_lock(&tas->mtx); in tas_snd_mixer_put()
399 mutex_lock(&tas->mtx); in tas_snd_drc_range_get()
414 mutex_lock(&tas->mtx); in tas_snd_drc_range_put()
443 mutex_lock(&tas->mtx); in tas_snd_drc_switch_get()
[all …]
/linux-6.15/drivers/nfc/
H A Dvirtual_ncidev.c26 struct mutex mtx; member
44 mutex_lock(&vdev->mtx); in virtual_nci_close()
48 mutex_unlock(&vdev->mtx); in virtual_nci_close()
57 mutex_lock(&vdev->mtx); in virtual_nci_send()
59 mutex_unlock(&vdev->mtx); in virtual_nci_send()
65 mutex_unlock(&vdev->mtx); in virtual_nci_send()
69 mutex_unlock(&vdev->mtx); in virtual_nci_send()
88 mutex_lock(&vdev->mtx); in virtual_ncidev_read()
93 mutex_lock(&vdev->mtx); in virtual_ncidev_read()
108 mutex_unlock(&vdev->mtx); in virtual_ncidev_read()
[all …]
/linux-6.15/rust/pin-init/examples/
H A Dmutex.rs106 mtx: self, in lock()
123 mtx: &'a CMutex<T>, field
130 let sguard = self.mtx.spin_lock.acquire(); in drop()
131 self.mtx.locked.set(false); in drop()
145 unsafe { &*self.mtx.data.get() } in deref()
152 unsafe { &mut *self.mtx.data.get() } in deref_mut()
186 let mtx = mtx.clone(); in main() localVariable
192 *mtx.lock() += 1; in main()
197 *mtx.lock() += 1; in main()
207 println!("{:?}", &*mtx.lock()); in main()
[all …]
H A Dpthread_mutex.rs107 PThreadMutexGuard { mtx: self } in lock()
112 mtx: &'a PThreadMutex<T>, field
118 unsafe { libc::pthread_mutex_unlock(self.mtx.raw.get()) }; in drop()
126 unsafe { &*self.mtx.data.get() } in deref()
132 unsafe { &mut *self.mtx.data.get() } in deref_mut()
149 let mtx: Pin<Arc<PThreadMutex<usize>>> = Arc::try_pin_init(PThreadMutex::new(0)).unwrap(); in main() localVariable
154 let mtx = mtx.clone(); in main() localVariable
160 *mtx.lock() += 1; in main()
165 *mtx.lock() += 1; in main()
175 println!("{:?}", &*mtx.lock()); in main()
[all …]
H A Dstatic_init.rs89 let mtx: Pin<Arc<CMutex<usize>>> = Arc::pin_init(CMutex::new(0)).unwrap(); in main() localVariable
94 let mtx = mtx.clone(); in main() localVariable
102 *mtx.lock() += 1; in main()
110 *mtx.lock() += 1; in main()
120 println!("{:?}, {:?}", &*mtx.lock(), &*COUNT.lock()); in main()
121 assert_eq!(*mtx.lock(), workload * thread_count * 2); in main()
/linux-6.15/kernel/locking/
H A Dtest-ww_mutex.c42 struct test_mutex *mtx = container_of(work, typeof(*mtx), work); in test_mutex_work() local
44 complete(&mtx->ready); in test_mutex_work()
53 complete(&mtx->done); in test_mutex_work()
60 struct test_mutex mtx; in __test_mutex() local
69 init_completion(&mtx.ready); in __test_mutex()
70 init_completion(&mtx.go); in __test_mutex()
71 init_completion(&mtx.done); in __test_mutex()
72 mtx.flags = flags; in __test_mutex()
74 schedule_work(&mtx.work); in __test_mutex()
78 complete(&mtx.go); in __test_mutex()
[all …]
/linux-6.15/drivers/net/ethernet/atheros/alx/
H A Dethtool.c166 mutex_lock(&alx->mtx); in alx_get_link_ksettings()
169 mutex_unlock(&alx->mtx); in alx_get_link_ksettings()
205 mutex_lock(&alx->mtx); in alx_set_link_ksettings()
207 mutex_unlock(&alx->mtx); in alx_set_link_ksettings()
218 mutex_lock(&alx->mtx); in alx_get_pauseparam()
223 mutex_unlock(&alx->mtx); in alx_get_pauseparam()
243 mutex_lock(&alx->mtx); in alx_set_pauseparam()
257 mutex_unlock(&alx->mtx); in alx_set_pauseparam()
267 mutex_unlock(&alx->mtx); in alx_set_pauseparam()
H A Dmain.c1093 mutex_init(&alx->mtx); in alx_init_sw()
1355 mutex_lock(&alx->mtx); in alx_open()
1366 mutex_lock(&alx->mtx); in alx_stop()
1379 mutex_lock(&alx->mtx); in alx_link_check()
1388 mutex_lock(&alx->mtx); in alx_reset()
1796 mutex_lock(&alx->mtx); in alx_probe()
1914 mutex_lock(&alx->mtx); in alx_suspend()
1929 mutex_lock(&alx->mtx); in alx_resume()
1960 mutex_lock(&alx->mtx); in alx_pci_error_detected()
1985 mutex_lock(&alx->mtx); in alx_pci_error_slot_reset()
[all …]
/linux-6.15/drivers/regulator/
H A Disl6271a-regulator.c26 struct mutex mtx; member
34 mutex_lock(&pmic->mtx); in isl6271a_get_voltage_sel()
40 mutex_unlock(&pmic->mtx); in isl6271a_get_voltage_sel()
50 mutex_lock(&pmic->mtx); in isl6271a_set_voltage_sel()
56 mutex_unlock(&pmic->mtx); in isl6271a_set_voltage_sel()
118 mutex_init(&pmic->mtx); in isl6271a_probe()
/linux-6.15/drivers/staging/vme_user/
H A Dvme.c1083 mutex_unlock(&list->mtx); in vme_dma_list_add()
1110 mutex_lock(&list->mtx); in vme_dma_list_exec()
1114 mutex_unlock(&list->mtx); in vme_dma_list_exec()
1155 mutex_unlock(&list->mtx); in vme_dma_list_free()
1447 mutex_lock(&lm->mtx); in vme_lm_request()
1450 mutex_unlock(&lm->mtx); in vme_lm_request()
1454 mutex_unlock(&lm->mtx); in vme_lm_request()
1472 mutex_lock(&lm->mtx); in vme_lm_request()
1474 mutex_unlock(&lm->mtx); in vme_lm_request()
1674 mutex_lock(&lm->mtx); in vme_lm_free()
[all …]
H A Dvme_fake.c206 mutex_lock(&image->mtx); in fake_slave_set()
234 mutex_lock(&image->mtx); in fake_slave_get()
858 mutex_lock(&lm->mtx); in fake_lm_set()
885 mutex_unlock(&lm->mtx); in fake_lm_set()
901 mutex_lock(&lm->mtx); in fake_lm_get()
907 mutex_unlock(&lm->mtx); in fake_lm_get()
927 mutex_lock(&lm->mtx); in fake_lm_attach()
950 mutex_unlock(&lm->mtx); in fake_lm_attach()
966 mutex_lock(&lm->mtx); in fake_lm_detach()
982 mutex_unlock(&lm->mtx); in fake_lm_detach()
[all …]
H A Dvme_bridge.h31 struct mutex mtx; member
58 struct mutex mtx; member
64 struct mutex mtx; member
75 struct mutex mtx; member
/linux-6.15/drivers/net/ethernet/marvell/prestera/
H A Dprestera_counter.c16 struct mutex mtx; /* protect block_list */ member
32 struct mutex mtx; /* protect stats and counter_idr */ member
52 mutex_lock(&counter->mtx); in prestera_counter_lock()
57 mutex_unlock(&counter->mtx); in prestera_counter_unlock()
62 mutex_lock(&block->mtx); in prestera_counter_block_lock()
67 mutex_unlock(&block->mtx); in prestera_counter_block_unlock()
176 mutex_init(&block->mtx); in prestera_counter_block_get()
188 mutex_destroy(&block->mtx); in prestera_counter_block_get()
221 mutex_destroy(&block->mtx); in prestera_counter_block_put()
451 mutex_init(&counter->mtx); in prestera_counter_init()
[all …]
/linux-6.15/fs/
H A Deventpoll.c186 struct mutex mtx; member
907 mutex_lock(&ep->mtx); in ep_clear_and_put()
935 mutex_unlock(&ep->mtx); in ep_clear_and_put()
1008 mutex_unlock(&ep->mtx); in __ep_eventpoll_poll()
1078 mutex_lock(&ep->mtx); in ep_show_fdinfo()
1092 mutex_unlock(&ep->mtx); in ep_show_fdinfo()
1136 mutex_lock(&ep->mtx); in eventpoll_release_file()
1155 mutex_init(&ep->mtx); in ep_alloc()
1231 mutex_lock(&ep->mtx); in get_epoll_tfile_raw_ptr()
1237 mutex_unlock(&ep->mtx); in get_epoll_tfile_raw_ptr()
[all …]
/linux-6.15/drivers/usb/misc/
H A Dadutux.c71 struct mutex mtx; member
356 if (mutex_lock_interruptible(&dev->mtx)) in adu_read()
498 mutex_unlock(&dev->mtx); in adu_read()
516 retval = mutex_lock_interruptible(&dev->mtx); in adu_write()
541 mutex_unlock(&dev->mtx); in adu_write()
556 retval = mutex_lock_interruptible(&dev->mtx); in adu_write()
610 mutex_unlock(&dev->mtx); in adu_write()
614 mutex_unlock(&dev->mtx); in adu_write()
664 mutex_init(&dev->mtx); in adu_probe()
773 mutex_lock(&dev->mtx); /* not interruptible */ in adu_disconnect()
[all …]
/linux-6.15/net/rfkill/
H A Dcore.c79 struct mutex mtx; member
286 mutex_lock(&data->mtx); in rfkill_send_events()
288 mutex_unlock(&data->mtx); in rfkill_send_events()
1175 mutex_init(&data->mtx); in rfkill_fop_open()
1190 mutex_lock(&data->mtx); in rfkill_fop_open()
1217 mutex_lock(&data->mtx); in rfkill_fop_poll()
1220 mutex_unlock(&data->mtx); in rfkill_fop_poll()
1233 mutex_lock(&data->mtx); in rfkill_fop_read()
1246 mutex_lock(&data->mtx); in rfkill_fop_read()
1264 mutex_unlock(&data->mtx); in rfkill_fop_read()
[all …]
/linux-6.15/drivers/video/fbdev/omap2/omapfb/
H A Domapfb.h80 struct mutex mtx; member
165 mutex_lock(&fbdev->mtx); in omapfb_lock()
170 mutex_unlock(&fbdev->mtx); in omapfb_unlock()
/linux-6.15/sound/pci/aw2/
H A Daw2-alsa.c88 struct mutex mtx; member
281 mutex_init(&chip->mtx); in snd_aw2_probe()
351 mutex_lock(&chip->mtx); in snd_aw2_pcm_prepare_playback()
367 mutex_unlock(&chip->mtx); in snd_aw2_pcm_prepare_playback()
380 mutex_lock(&chip->mtx); in snd_aw2_pcm_prepare_capture()
396 mutex_unlock(&chip->mtx); in snd_aw2_pcm_prepare_capture()
/linux-6.15/drivers/net/wireless/atmel/
H A Dat76c50x-usb.c1469 mutex_lock(&priv->mtx); in at76_work_set_promisc()
1490 mutex_lock(&priv->mtx); in at76_work_submit_rx()
1714 mutex_lock(&priv->mtx); in at76_work_join_bssid()
1834 mutex_lock(&priv->mtx); in at76_mac80211_start()
1863 mutex_lock(&priv->mtx); in at76_mac80211_stop()
1886 mutex_lock(&priv->mtx); in at76_add_interface()
1921 mutex_lock(&priv->mtx); in at76_dwork_hw_scan()
1962 mutex_lock(&priv->mtx); in at76_hw_scan()
2013 mutex_lock(&priv->mtx); in at76_config()
2041 mutex_lock(&priv->mtx); in at76_bss_info_changed()
[all …]
/linux-6.15/net/mac80211/
H A Dscan.c366 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_prep_hw_scan()
457 lockdep_is_held(&local->hw.wiphy->mtx)), in __ieee80211_scan_completed()
474 lockdep_is_held(&local->hw.wiphy->mtx)); in __ieee80211_scan_completed()
623 lockdep_is_held(&local->hw.wiphy->mtx)))) in ieee80211_run_deferred_scan()
669 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_scan_state_send_probe()
680 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_scan_state_send_probe()
927 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_scan_state_decision()
967 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_scan_state_set_channel()
1081 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_scan_work()
1289 lockdep_is_held(&local->hw.wiphy->mtx))); in ieee80211_scan_cancel()
[all …]
/linux-6.15/drivers/iio/
H A Dindustrialio-core.c593 const struct iio_mount_matrix *mtx; in iio_show_mount_matrix() local
595 mtx = ((iio_get_mount_matrix_t *)priv)(indio_dev, chan); in iio_show_mount_matrix()
596 if (IS_ERR(mtx)) in iio_show_mount_matrix()
597 return PTR_ERR(mtx); in iio_show_mount_matrix()
599 if (!mtx) in iio_show_mount_matrix()
600 mtx = &iio_mount_idmatrix; in iio_show_mount_matrix()
603 mtx->rotation[0], mtx->rotation[1], mtx->rotation[2], in iio_show_mount_matrix()
604 mtx->rotation[3], mtx->rotation[4], mtx->rotation[5], in iio_show_mount_matrix()
605 mtx->rotation[6], mtx->rotation[7], mtx->rotation[8]); in iio_show_mount_matrix()

1234