implement threads.h

Most of the functions are wrappers around the pthread.h functions, but
we are not allowed to include pthread.h.
This commit is contained in:
Connor-GH
2026-05-10 19:40:05 -05:00
parent 456636dce1
commit 774a9a658d
4 changed files with 344 additions and 2 deletions
+1 -1
View File
@@ -924,7 +924,7 @@ pub unsafe extern "C" fn posix_memalign(
#[unsafe(no_mangle)]
pub unsafe extern "C" fn posix_openpt(flags: c_int) -> c_int {
#[cfg(target_os = "redox")]
let r = unsafe { open(c"/scheme/pty".as_ptr(), O_CREAT) };
let r = unsafe { open(c"/scheme/pty".as_ptr(), flags) };
#[cfg(target_os = "linux")]
let r = unsafe { open(c"/dev/ptmx".as_ptr(), flags) };