| /linux/tools/perf/util/ |
| H A D | mutex.c | 20 static void __mutex_init(struct mutex *mtx, bool pshared, bool recursive) in __mutex_init() argument 34 CHECK_ERR(pthread_mutex_init(&mtx->lock, &attr)); in __mutex_init() 38 void mutex_init(struct mutex *mtx) in mutex_init() argument 40 __mutex_init(mtx, /*pshared=*/false, /*recursive=*/false); in mutex_init() 43 void mutex_init_pshared(struct mutex *mtx) in mutex_init_pshared() argument 45 __mutex_init(mtx, /*pshared=*/true, /*recursive=*/false); in mutex_init_pshared() 48 void mutex_init_recursive(struct mutex *mtx) in mutex_init_recursive() argument 50 __mutex_init(mtx, /*pshared=*/false, /*recursive=*/true); in mutex_init_recursive() 53 void mutex_destroy(struct mutex *mtx) in mutex_destroy() argument 55 CHECK_ERR(pthread_mutex_destroy(&mtx->lock)); in mutex_destroy() [all …]
|
| H A D | mutex.h | 101 void mutex_init(struct mutex *mtx); 106 void mutex_init_pshared(struct mutex *mtx); 108 void mutex_init_recursive(struct mutex *mtx); 109 void mutex_destroy(struct mutex *mtx); 111 void mutex_lock(struct mutex *mtx) EXCLUSIVE_LOCK_FUNCTION(*mtx); 112 void mutex_unlock(struct mutex *mtx) UNLOCK_FUNCTION(*mtx); 114 bool mutex_trylock(struct mutex *mtx) EXCLUSIVE_TRYLOCK_FUNCTION(true, *mtx); 125 void cond_wait(struct cond *cnd, struct mutex *mtx) EXCLUSIVE_LOCKS_REQUIRED(mtx);
|
| H A D | rwsem.c | 12 mutex_init(&sem->mtx); in init_rwsem() 22 mutex_destroy(&sem->mtx); in exit_rwsem() 33 mutex_lock(&sem->mtx); in down_read() 44 mutex_unlock(&sem->mtx); in up_read() 55 mutex_lock(&sem->mtx); in down_write() 66 mutex_unlock(&sem->mtx); in up_write()
|
| H A D | rwsem.h | 15 struct mutex mtx; member
|
| /linux/drivers/nfc/ |
| H A D | virtual_ncidev.c | 26 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() 90 mutex_unlock(&vdev->mtx); in virtual_ncidev_read() 93 mutex_lock(&vdev->mtx); in virtual_ncidev_read() [all …]
|
| /linux/rust/pin-init/examples/ |
| H A D | mutex.rs | 102 mtx: self, in lock() 119 mtx: &'a CMutex<T>, in get_data_mut() 126 let sguard = self.mtx.spin_lock.acquire(); 127 self.mtx.locked.set(false); field 128 if let Some(list_field) = self.mtx.wait_list.next() { 144 unsafe { &*self.mtx.data.get() } in drop() 151 unsafe { &mut *self.mtx.data.get() } in deref() 188 let mtx: Pin<Arc<CMutex<usize>>> = Arc::pin_init(CMutex::new(0)).unwrap(); in insert_new() 193 let mtx = mtx 196 let mtx: Pin<Arc<CMutex<usize>>> = Arc::pin_init(CMutex::new(0)).unwrap(); main() localVariable 201 let mtx = mtx.clone(); main() localVariable [all...] |
| H A D | pthread_mutex.rs | 111 PThreadMutexGuard { mtx: self } in lock() 116 mtx: &'a PThreadMutex<T>, 122 unsafe { libc::pthread_mutex_unlock(self.mtx.raw.get()) }; in drop() 130 unsafe { &*self.mtx.data.get() } in deref() 136 unsafe { &mut *self.mtx.data.get() } in deref_mut() 154 let mtx: Pin<Arc<PThreadMutex<usize>>> = Arc::try_pin_init(PThreadMutex::new(0)).unwrap(); in main() 159 let mtx = mtx.clone(); in main() 165 *mtx.lock() += 1; in main() 170 *mtx in main() 117 mtx: &'a PThreadMutex<T>, global() field 155 let mtx: Pin<Arc<PThreadMutex<usize>>> = Arc::try_pin_init(PThreadMutex::new(0)).unwrap(); main() localVariable 160 let mtx = mtx.clone(); main() localVariable [all...] |
| H A D | static_init.rs | 87 let mtx: Pin<Arc<CMutex<usize>>> = Arc::pin_init(CMutex::new(0)).unwrap(); in main() 92 let mtx = mtx.clone(); in main() 100 *mtx.lock() += 1; in main() 108 *mtx.lock() += 1; in main() 118 println!("{:?}, {:?}", *mtx.lock(), *COUNT.lock()); in main() 119 assert_eq!(*mtx.lock(), workload * thread_count * 2); in main() 90 let mtx: Pin<Arc<CMutex<usize>>> = Arc::pin_init(CMutex::new(0)).unwrap(); main() localVariable 95 let mtx = mtx.clone(); main() localVariable
|
| /linux/kernel/locking/ |
| H A D | test-ww_mutex.c | 43 struct test_mutex *mtx = container_of(work, typeof(*mtx), work); in test_mutex_work() local 45 complete(&mtx->ready); in test_mutex_work() 46 wait_for_completion(&mtx->go); in test_mutex_work() 48 if (mtx->flags & TEST_MTX_TRY) { in test_mutex_work() 49 while (!ww_mutex_trylock(&mtx->mutex, NULL)) in test_mutex_work() 52 ww_mutex_lock(&mtx->mutex, NULL); in test_mutex_work() 54 complete(&mtx->done); in test_mutex_work() 55 ww_mutex_unlock(&mtx->mutex); in test_mutex_work() 61 struct test_mutex mtx; in __test_mutex() local 65 ww_mutex_init(&mtx.mutex, class); in __test_mutex() [all …]
|
| /linux/sound/aoa/codecs/ |
| H A D | tas.c | 97 struct mutex mtx; member 238 guard(mutex)(&tas->mtx); in tas_snd_vol_get() 256 guard(mutex)(&tas->mtx); in tas_snd_vol_put() 284 guard(mutex)(&tas->mtx); in tas_snd_mute_get() 295 guard(mutex)(&tas->mtx); in tas_snd_mute_put() 332 guard(mutex)(&tas->mtx); in tas_snd_mixer_get() 345 guard(mutex)(&tas->mtx); in tas_snd_mixer_put() 387 guard(mutex)(&tas->mtx); in tas_snd_drc_range_get() 401 guard(mutex)(&tas->mtx); in tas_snd_drc_range_put() 427 guard(mutex)(&tas->mtx); in tas_snd_drc_switch_get() [all...] |
| /linux/drivers/net/ethernet/atheros/alx/ |
| H A D | ethtool.c | 166 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 D | main.c | 1093 mutex_init(&alx->mtx); in alx_init_sw() 1125 lockdep_assert_held(&alx->mtx); in alx_halt() 1152 lockdep_assert_held(&alx->mtx); in alx_activate() 1168 lockdep_assert_held(&alx->mtx); in alx_reinit() 1184 mutex_lock(&alx->mtx); in alx_change_mtu() 1186 mutex_unlock(&alx->mtx); in alx_change_mtu() 1259 lockdep_assert_held(&alx->mtx); in __alx_stop() 1296 lockdep_assert_held(&alx->mtx); in alx_check_link() 1355 mutex_lock(&alx->mtx); in alx_open() 1357 mutex_unlock(&alx->mtx); in alx_open() [all …]
|
| H A D | alx.h | 141 struct mutex mtx; member
|
| /linux/drivers/net/ethernet/marvell/prestera/ |
| H A D | prestera_counter.c | 16 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() 175 mutex_init(&block->mtx); in prestera_counter_block_get() 187 mutex_destroy(&block->mtx); in prestera_counter_block_get() 220 mutex_destroy(&block->mtx); in prestera_counter_block_put() 449 mutex_init(&counter->mtx); in prestera_counter_init() [all …]
|
| /linux/fs/ |
| H A D | eventpoll.c | 302 struct mutex mtx; member 931 return rcu_dereference_check(epi->ws, lockdep_is_held(&epi->ep->mtx)); in ep_wakeup_source() 1057 mutex_destroy(&ep->mtx); in ep_free() 1102 lockdep_assert_held(&ep->mtx); in ep_remove_file() 1129 lockdep_assert_held(&ep->mtx); in ep_remove_epi() 1159 lockdep_assert_held(&ep->mtx); in ep_remove() 1191 lockdep_assert_held(&ep->mtx); in ep_drain_pollwaits() 1218 lockdep_assert_held(&ep->mtx); in ep_drain_tree() 1244 mutex_lock(&ep->mtx); in ep_clear_and_put() 1247 mutex_unlock(&ep->mtx); in ep_clear_and_put() [all …]
|
| /linux/drivers/staging/vme_user/ |
| H A D | vme_fake.c | 206 mutex_lock(&image->mtx); in fake_slave_set() 215 mutex_unlock(&image->mtx); in fake_slave_set() 234 mutex_lock(&image->mtx); in fake_slave_get() 243 mutex_unlock(&image->mtx); in fake_slave_get() 858 mutex_lock(&lm->mtx); in fake_lm_set() 863 mutex_unlock(&lm->mtx); in fake_lm_set() 876 mutex_unlock(&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() [all …]
|
| H A D | vme_tsi148.c | 1797 mutex_lock(&ctrlr->mtx); in tsi148_dma_list_exec() 1808 mutex_unlock(&ctrlr->mtx); in tsi148_dma_list_exec() 1818 mutex_unlock(&ctrlr->mtx); in tsi148_dma_list_exec() 1861 mutex_lock(&ctrlr->mtx); in tsi148_dma_list_exec() 1863 mutex_unlock(&ctrlr->mtx); in tsi148_dma_list_exec() 1912 mutex_lock(&lm->mtx); in tsi148_lm_set() 1917 mutex_unlock(&lm->mtx); in tsi148_lm_set() 1937 mutex_unlock(&lm->mtx); in tsi148_lm_set() 1957 mutex_unlock(&lm->mtx); in tsi148_lm_set() 1973 mutex_lock(&lm->mtx); in tsi148_lm_get() [all …]
|
| /linux/drivers/usb/misc/ |
| H A D | adutux.c | 71 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/drivers/video/fbdev/omap2/omapfb/ |
| H A D | omapfb.h | 80 struct mutex mtx; member 165 mutex_lock(&fbdev->mtx); in omapfb_lock() 170 mutex_unlock(&fbdev->mtx); in omapfb_unlock()
|
| /linux/net/rfkill/ |
| H A D | core.c | 81 struct mutex mtx; member 280 scoped_guard(mutex, &data->mtx) { in rfkill_fill_event() 1191 mutex_init(&data->mtx); in rfkill_fop_open() 1196 * start getting events from elsewhere but hold mtx to get in rfkill_fop_open() 1217 mutex_destroy(&data->mtx); in rfkill_fop_open() 1231 mutex_lock(&data->mtx); in rfkill_fop_poll() 1234 mutex_unlock(&data->mtx); in rfkill_fop_poll() 1247 mutex_lock(&data->mtx); in rfkill_fop_read() 1254 mutex_unlock(&data->mtx); in rfkill_fop_read() 1260 mutex_lock(&data->mtx); in rfkill_fop_read() [all...] |
| /linux/drivers/net/wireless/atmel/ |
| H A D | at76c50x-usb.c | 1469 mutex_lock(&priv->mtx); in at76_work_set_promisc() 1481 mutex_unlock(&priv->mtx); in at76_work_set_promisc() 1490 mutex_lock(&priv->mtx); in at76_work_submit_rx() 1492 mutex_unlock(&priv->mtx); in at76_work_submit_rx() 1717 mutex_lock(&priv->mtx); in at76_work_join_bssid() 1722 mutex_unlock(&priv->mtx); in at76_work_join_bssid() 1837 mutex_lock(&priv->mtx); in at76_mac80211_start() 1851 mutex_unlock(&priv->mtx); in at76_mac80211_start() 1866 mutex_lock(&priv->mtx); in at76_mac80211_stop() 1878 mutex_unlock(&priv->mtx); in at76_mac80211_stop() [all …]
|
| /linux/net/wireless/ |
| H A D | core.c | 232 lockdep_assert_held(&rdev->wiphy.mtx); in cfg80211_stop_p2p_device() 260 lockdep_assert_held(&rdev->wiphy.mtx); in cfg80211_stop_nan() 293 lockdep_assert_held(&rdev->wiphy.mtx); in cfg80211_nan_set_local_schedule() 331 lockdep_assert_held(&rdev->wiphy.mtx); in cfg80211_stop_pd() 627 mutex_init(&rdev->wiphy.mtx); in wiphy_new_nm() 1265 lockdep_assert_held(&rdev->wiphy.mtx); in cfg80211_process_wiphy_works() 1377 mutex_destroy(&rdev->wiphy.mtx); in cfg80211_dev_free() 1416 lockdep_assert_held(&rdev->wiphy.mtx); in _cfg80211_unregister_wdev() 1496 lockdep_assert_held(&rdev->wiphy.mtx); in cfg80211_update_iface_num() 1509 lockdep_assert_held(&rdev->wiphy.mtx); in cfg80211_leave_locked() [all …]
|
| /linux/kernel/events/ |
| H A D | hw_breakpoint.c | 601 struct mutex *mtx = bp_constraints_lock(bp); in reserve_bp_slot() local 604 bp_constraints_unlock(mtx); in reserve_bp_slot() 620 struct mutex *mtx = bp_constraints_lock(bp); in release_bp_slot() local 623 bp_constraints_unlock(mtx); in release_bp_slot() 650 struct mutex *mtx = bp_constraints_lock(bp); in modify_bp_slot() local 653 bp_constraints_unlock(mtx); in modify_bp_slot()
|
| /linux/drivers/watchdog/ |
| H A D | pcwd_usb.c | 144 struct mutex mtx; member 650 mutex_init(&usb_pcwd->mtx); in usb_pcwd_probe() 779 mutex_lock(&usb_pcwd->mtx); in usb_pcwd_disconnect() 793 mutex_unlock(&usb_pcwd->mtx); in usb_pcwd_disconnect()
|
| /linux/drivers/net/wireless/morsemicro/mm81x/ |
| H A D | mac.h | 46 lockdep_is_held(&mors->hw->wiphy->mtx)); in mm81x_rcu_dereference_vif_id()
|