relibc: P3-pthread-yield — sched_yield via proc scheme

Re-apply P3-pthread-yield.patch from local/patches/relibc/ to the
local fork. Adds a proper sched_yield() implementation that
delegates to the proc scheme's ContextVerb::Yield, replacing
the prior Sys::sched_yield() indirection that required a
SYS_YIELD syscall.

Multi-threading plan Phase 0e, plan order 1 of 16.
This commit is contained in:
2026-07-02 07:03:41 +03:00
parent 6caad3a538
commit 83a5c11e21
+7
View File
@@ -307,6 +307,13 @@ pub unsafe extern "C" fn pthread_testcancel() {
unsafe { pthread::testcancel() };
}
/// <https://man7.org/linux/man-pages/man3/pthread_yield.3.html>
///
/// Non-standard GNU extension. Prefer `sched_yield()` instead.
pub extern "C" fn pthread_yield() {
let _ = Sys::sched_yield();
}
// Must be the same struct as defined in the pthread_cleanup_push macro.
#[repr(C)]
pub(crate) struct CleanupLinkedListEntry {