Skip to content

Commit 0d03a79

Browse files
committed
Add skeleton downgrade internal methods
1 parent fb0dc78 commit 0d03a79

File tree

5 files changed

+25
-0
lines changed

5 files changed

+25
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ impl RwLock {
166166
}
167167
}
168168

169+
#[inline]
170+
pub unsafe fn downgrade(&self) {
171+
todo!()
172+
}
173+
169174
#[cold]
170175
fn write_contended(&self) {
171176
let mut state = self.spin_write();

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,9 @@ impl RwLock {
6262
pub unsafe fn write_unlock(&self) {
6363
assert_eq!(self.mode.replace(0), -1);
6464
}
65+
66+
#[inline]
67+
pub unsafe fn downgrade(&self) {
68+
todo!()
69+
}
6570
}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,11 @@ impl RwLock {
451451
}
452452
}
453453

454+
#[inline]
455+
pub unsafe fn downgrade(&self) {
456+
todo!()
457+
}
458+
454459
/// # Safety
455460
/// * The lock must be exclusively owned by this thread.
456461
/// * There must be threads queued on the lock.

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ impl RwLock {
8383
let rwl = self.raw();
8484
expect_success_aborting(unsafe { abi::rwl_unl_rwl(rwl) }, &"rwl_unl_rwl");
8585
}
86+
87+
#[inline]
88+
pub unsafe fn downgrade(&self) {
89+
todo!()
90+
}
8691
}
8792

8893
impl Drop for RwLock {

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,9 @@ impl RwLock {
4141
pub unsafe fn write_unlock(&self) {
4242
unsafe { self.inner.unlock() };
4343
}
44+
45+
#[inline]
46+
pub unsafe fn downgrade(&self) {
47+
todo!()
48+
}
4449
}

0 commit comments

Comments
 (0)