Searched refs:lock (Results 1 – 13 of 13) sorted by relevance
| /rust/helpers/ |
| A D | spinlock.c | 5 void rust_helper___spin_lock_init(spinlock_t *lock, const char *name, in rust_helper___spin_lock_init() argument 10 __spin_lock_init(lock, name, key, false); in rust_helper___spin_lock_init() 15 spin_lock_init(lock); in rust_helper___spin_lock_init() 19 void rust_helper_spin_lock(spinlock_t *lock) in rust_helper_spin_lock() argument 21 spin_lock(lock); in rust_helper_spin_lock() 24 void rust_helper_spin_unlock(spinlock_t *lock) in rust_helper_spin_unlock() argument 26 spin_unlock(lock); in rust_helper_spin_unlock() 29 int rust_helper_spin_trylock(spinlock_t *lock) in rust_helper_spin_trylock() argument 31 return spin_trylock(lock); in rust_helper_spin_trylock() 34 void rust_helper_spin_assert_is_held(spinlock_t *lock) in rust_helper_spin_assert_is_held() argument [all …]
|
| A D | mutex.c | 5 void rust_helper_mutex_lock(struct mutex *lock) in rust_helper_mutex_lock() argument 7 mutex_lock(lock); in rust_helper_mutex_lock() 10 int rust_helper_mutex_trylock(struct mutex *lock) in rust_helper_mutex_trylock() argument 12 return mutex_trylock(lock); in rust_helper_mutex_trylock() 26 void rust_helper_mutex_destroy(struct mutex *lock) in rust_helper_mutex_destroy() argument 28 mutex_destroy(lock); in rust_helper_mutex_destroy()
|
| /rust/kernel/sync/ |
| A D | lock.rs | 65 unsafe fn lock(ptr: *mut Self::State) -> Self::GuardState; in lock() method 89 *guard_state = unsafe { Self::lock(ptr) }; in relock() 167 pub fn lock(&self) -> Guard<'_, T, B> { in lock() method 170 let state = unsafe { B::lock(self.state.get()) }; in lock() 194 pub(crate) lock: &'a Lock<T, B>, 230 self.lock in lock_ref() 235 unsafe { B::unlock(self.lock.state.get(), &self.state) }; in do_unlocked() 250 unsafe { &*self.lock.data.get() } in deref() 257 unsafe { &mut *self.lock.data.get() } in deref_mut() 276 unsafe { B::assert_is_held(lock.state.get()) }; in new() [all …]
|
| A D | locked_by.rs | 5 use super::{lock::Backend, lock::Lock};
|
| A D | condvar.rs | 8 use super::{lock::Backend, lock::Guard, LockClassKey};
|
| /rust/pin-init/examples/ |
| A D | static_init.rs | 29 lock: SpinLock, field 41 lock: SpinLock::new(), in new() 54 let _guard = self.lock.acquire(); in deref() 101 *COUNT.lock() += 1; in main() 103 *mtx.lock() += 1; in main() 105 *COUNT.lock() += 1; in main() 111 *mtx.lock() += 1; in main() 121 println!("{:?}, {:?}", &*mtx.lock(), &*COUNT.lock()); in main() 122 assert_eq!(*mtx.lock(), workload * thread_count * 2); in main()
|
| A D | pthread_mutex.rs | 109 pub fn lock(&self) -> PThreadMutexGuard<'_, T> { in lock() method 166 *mtx.lock() += 1; in main() 171 *mtx.lock() += 1; in main() 181 println!("{:?}", &*mtx.lock()); in main() 182 assert_eq!(*mtx.lock(), workload * thread_count * 2); in main()
|
| A D | mutex.rs | 92 pub fn lock(&self) -> Pin<CMutexGuard<'_, T>> { in lock() method 207 *mtx.lock() += 1; in main() 212 *mtx.lock() += 1; in main() 222 println!("{:?}", &*mtx.lock()); in main() 223 assert_eq!(*mtx.lock(), workload * thread_count * 2); in main()
|
| /rust/kernel/sync/lock/ |
| A D | global.rs | 9 sync::lock::{Backend, Guard, Lock}, 80 pub fn lock(&'static self) -> GlobalGuard<B> { in lock() method 82 inner: self.inner.lock(), in lock() 269 impl $crate::sync::lock::GlobalLockBackend for $name { 280 $pub static $name: $crate::sync::lock::GlobalLock<$name> = { 287 unsafe { $crate::sync::lock::GlobalLock::new(init) } 297 $crate::sync::lock::mutex::MutexBackend 300 $crate::sync::lock::spinlock::SpinLockBackend
|
| A D | mutex.rs | 115 unsafe fn lock(ptr: *mut Self::State) -> Self::GuardState { in lock() method
|
| A D | spinlock.rs | 114 unsafe fn lock(ptr: *mut Self::State) -> Self::GuardState { in lock() method
|
| /rust/kernel/ |
| A D | sync.rs | 16 pub mod lock; module 24 pub use lock::global::{global_lock, GlobalGuard, GlobalLock, GlobalLockBackend, GlobalLockedBy}; 25 pub use lock::mutex::{new_mutex, Mutex, MutexGuard}; 26 pub use lock::spinlock::{new_spinlock, SpinLock, SpinLockGuard};
|
| A D | xarray.rs | 135 pub fn lock(&self) -> Guard<'_, T> { in lock() method
|
Completed in 16 milliseconds