mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-24 18:03:25 +00:00
Add condition variable implementation
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
c04fd0c9a0
commit
34e9d71fe4
@ -124,3 +124,9 @@ impl<T: ?Sized + fmt::Debug, R: Deref<Target = Mutex<T>>> fmt::Debug for MutexGu
|
||||
impl<T: ?Sized, R: Deref<Target = Mutex<T>>> !Send for MutexGuard_<T, R> {}
|
||||
|
||||
unsafe impl<T: ?Sized + Sync, R: Deref<Target = Mutex<T>> + Sync> Sync for MutexGuard_<T, R> {}
|
||||
|
||||
impl<'a, T: ?Sized> MutexGuard<'a, T> {
|
||||
pub fn get_lock(guard: &MutexGuard<'a, T>) -> &'a Mutex<T> {
|
||||
guard.mutex
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user