0.3.0: converge relibc to upstream 0.6.0 + Red Bear patches

This commit is contained in:
2026-07-06 19:13:08 +03:00
parent 1a0edd8eeb
commit 4ef7e57571
1466 changed files with 75236 additions and 13644 deletions
+27
View File
@@ -0,0 +1,27 @@
use super::{AtomicLock, AttemptStatus};
const WAITING_BIT: u32 = 1 << 31;
const UNLOCKED: u32 = 0;
// We now have 2^32 - 1 possible thread ID values
pub struct ReentrantMutex<T> {
lock: AtomicLock,
content: UnsafeCell<T>,
}
unsafe impl<T: Send> Send for ReentrantMutex {}
unsafe impl<T: Send> Sync for ReentrantMutex {}
impl<T> ReentrantMutex<T> {
pub const fn new(context: T) -> Self {
Self {
lock: AtomicLock::new(UNLOCKED),
content: UnsafeCell::new(content),
}
}
}
pub struct ReentrantMutexGuard<'a, T: 'a> {
mutex: &'a ReentrantMutex<T>,
content: &'a T,
}
impl<'a, T> Deref for MutexGuard {
}