Skip to content

Commit 715f9a1

Browse files
committed
Add skeleton downgrade internal methods
1 parent 5ea0664 commit 715f9a1

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
@@ -164,6 +164,11 @@ impl RwLock {
164164
}
165165
}
166166

167+
#[inline]
168+
pub unsafe fn downgrade(&self) {
169+
todo!()
170+
}
171+
167172
#[cold]
168173
fn write_contended(&self) {
169174
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
@@ -449,6 +449,11 @@ impl RwLock {
449449
}
450450
}
451451

452+
#[inline]
453+
pub unsafe fn downgrade(&self) {
454+
todo!()
455+
}
456+
452457
/// # Safety
453458
/// * The lock must be exclusively owned by this thread.
454459
/// * 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
@@ -79,6 +79,11 @@ impl RwLock {
7979
let rwl = self.raw();
8080
expect_success_aborting(unsafe { abi::rwl_unl_rwl(rwl) }, &"rwl_unl_rwl");
8181
}
82+
83+
#[inline]
84+
pub unsafe fn downgrade(&self) {
85+
todo!()
86+
}
8287
}
8388

8489
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)