Skip to content

Commit 53bce7b

Browse files
committed
add implementation for no_threads.rs and teeos.rs
1 parent 15078e6 commit 53bce7b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

library/std/src/sys/sync/rwlock/no_threads.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,6 @@ impl RwLock {
6565

6666
#[inline]
6767
pub unsafe fn downgrade(&self) {
68-
todo!()
68+
assert_eq!(self.mode.replace(1), -1);
6969
}
7070
}

library/std/src/sys/sync/rwlock/teeos.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,5 @@ impl RwLock {
4343
}
4444

4545
#[inline]
46-
pub unsafe fn downgrade(&self) {
47-
todo!()
48-
}
46+
pub unsafe fn downgrade(&self) {}
4947
}

0 commit comments

Comments
 (0)