Use a single ReentrantMutex implementation on all platforms.

This commit is contained in:
Mara Bos
2022-04-14 11:11:41 +02:00
parent 07bb916d44
commit 4212de63ab
12 changed files with 91 additions and 540 deletions

View File

@@ -36,26 +36,3 @@ impl Mutex {
#[inline]
pub unsafe fn destroy(&self) {}
}
// All empty stubs because this platform does not yet support threads, so lock
// acquisition always succeeds.
pub struct ReentrantMutex {}
impl ReentrantMutex {
pub const unsafe fn uninitialized() -> ReentrantMutex {
ReentrantMutex {}
}
pub unsafe fn init(&self) {}
pub unsafe fn lock(&self) {}
#[inline]
pub unsafe fn try_lock(&self) -> bool {
true
}
pub unsafe fn unlock(&self) {}
pub unsafe fn destroy(&self) {}
}