(&self)
| 93 | /// after `fork()`, before any other thread is created. |
| 94 | #[cfg(unix)] |
| 95 | pub unsafe fn reinit_after_fork(&self) { |
| 96 | self.owner.store(0, Ordering::Relaxed); |
| 97 | unsafe { |
| 98 | let mutex_ptr = &self.mutex as *const R as *mut u8; |
| 99 | core::ptr::write_bytes(mutex_ptr, 0, core::mem::size_of::<R>()); |
| 100 | } |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | unsafe impl<R: RawMutex + Send, G: GetThreadId + Send> Send for RawThreadMutex<R, G> {} |
no test coverage detected