relibc: P5-robust-mutex-enotrec-fix — apply Phase 0e patch

This commit is contained in:
2026-07-02 07:13:21 +03:00
parent f21d523529
commit 72a916318b
2 changed files with 13 additions and 8 deletions
+7 -3
View File
@@ -43,9 +43,13 @@ pub unsafe fn init() {
thread.stack_size = STACK_SIZE;
}
unsafe { Tcb::current() }
.expect_notls("no TCB present for main thread")
.pthread = thread;
let tcb = unsafe { Tcb::current() }
.expect_notls("no TCB present for main thread");
tcb.pthread = thread;
OS_TID_TO_PTHREAD
.lock()
.insert(Sys::current_os_tid(), ForceSendSync(tcb as *const Tcb as *mut Tcb));
}
//static NEXT_INDEX: AtomicU32 = AtomicU32::new(FIRST_THREAD_IDX + 1);