Home
last modified time | relevance | path

Searched refs:MutexGuard (Results 1 – 3 of 3) sorted by relevance

/DragonOS-0.1.8/kernel/src/libs/
Dmutex.rs39 pub struct MutexGuard<'a, T: 'a> { struct
62 pub fn lock(&self) -> MutexGuard<T> { in lock()
84 return MutexGuard { lock: self }; in lock()
92 pub fn try_lock(&self) -> Result<MutexGuard<T>, SystemError> { in try_lock()
101 return Ok(MutexGuard { lock: self }); in try_lock()
150 impl<T> Deref for MutexGuard<'_, T> { implementation
159 impl<T> DerefMut for MutexGuard<'_, T> { implementation
166 impl<T> Drop for MutexGuard<'_, T> { implementation
Dwait_queue.rs15 mutex::MutexGuard,
110 pub fn sleep_unlock_mutex<T>(&self, to_unlock: MutexGuard<T>) { in sleep_unlock_mutex()
132 pub fn sleep_uninterruptible_unlock_mutex<T>(&self, to_unlock: MutexGuard<T>) { in sleep_uninterruptible_unlock_mutex()
/DragonOS-0.1.8/docs/kernel/locking/
Dmutex.md49 &emsp;&emsp;当需要读取、修改Mutex保护的数据时,请先使用Mutex的`lock()`方法。该方法会返回一个`MutexGuard`。您可以使用被保护的数据的成员函数来进行一些操作。或…
56 let mut g :MutexGuard<Vec<i32>>= x.lock();
106 pub fn lock(&self) -> MutexGuard<T>
120 pub fn try_lock(&self) -> Result<MutexGuard<T>, i32>