Skip to content

Commit e110f5e

Browse files
committed
Impl Send + Sync for RawReentrantMutex
1 parent b31f23f commit e110f5e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

vm/src/stdlib/thread.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ impl<R: RawMutexT, G: GetThreadId> RawReentrantMutex<R, G> {
128128
}
129129
}
130130

131+
unsafe impl<R: RawMutexT + Send, G: GetThreadId + Send> Send for RawReentrantMutex<R, G> {}
132+
unsafe impl<R: RawMutexT + Sync, G: GetThreadId + Sync> Sync for RawReentrantMutex<R, G> {}
133+
131134
unsafe impl<R: RawMutexT, G: GetThreadId> RawMutexT for RawReentrantMutex<R, G> {
132135
const INIT: Self = RawReentrantMutex {
133136
owner: AtomicUsize::new(0),

0 commit comments

Comments
 (0)