diff --git a/src/new/common/linux_like/mod.rs b/src/new/common/linux_like/mod.rs index 9aceb4e09f0e3..1faf98706392f 100644 --- a/src/new/common/linux_like/mod.rs +++ b/src/new/common/linux_like/mod.rs @@ -1 +1,4 @@ //! API that primarily comes from Linux but is also used other platforms (e.g. Android). + +#[cfg(target_os = "linux")] +pub(crate) mod pthread; diff --git a/src/new/common/linux_like/pthread.rs b/src/new/common/linux_like/pthread.rs new file mode 100644 index 0000000000000..19c7cd81ec3b9 --- /dev/null +++ b/src/new/common/linux_like/pthread.rs @@ -0,0 +1,23 @@ +use crate::prelude::*; + +extern "C" { + #[cfg(target_os = "linux")] + pub fn pthread_getaffinity_np( + thread: crate::pthread_t, + cpusetsize: size_t, + cpuset: *mut crate::cpu_set_t, + ) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_getname_np(thread: crate::pthread_t, name: *mut c_char, len: size_t) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_setaffinity_np( + thread: crate::pthread_t, + cpusetsize: size_t, + cpuset: *const crate::cpu_set_t, + ) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_setname_np(thread: crate::pthread_t, name: *const c_char) -> c_int; +} diff --git a/src/new/common/posix/mod.rs b/src/new/common/posix/mod.rs index 454b840404c95..0428f6503a8a8 100644 --- a/src/new/common/posix/mod.rs +++ b/src/new/common/posix/mod.rs @@ -1,3 +1,8 @@ //! POSIX APIs that are used by a number of platforms +//! +//! These can be found at: . +// FIXME(pthread): eventually all platforms should use this module +#[cfg(target_os = "linux")] +pub(crate) mod pthread; pub(crate) mod unistd; diff --git a/src/new/common/posix/pthread.rs b/src/new/common/posix/pthread.rs new file mode 100644 index 0000000000000..847467b6b965a --- /dev/null +++ b/src/new/common/posix/pthread.rs @@ -0,0 +1,196 @@ +//! Header: `pthread.h` +//! +//! + +use crate::prelude::*; + +extern "C" { + #[cfg(target_os = "linux")] + pub fn pthread_atfork( + prepare: Option, + parent: Option, + child: Option, + ) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_attr_getguardsize( + attr: *const crate::pthread_attr_t, + guardsize: *mut size_t, + ) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_attr_getinheritsched( + attr: *const crate::pthread_attr_t, + inheritsched: *mut c_int, + ) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_attr_getschedparam( + attr: *const crate::pthread_attr_t, + param: *mut crate::sched_param, + ) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_attr_getschedpolicy( + attr: *const crate::pthread_attr_t, + policy: *mut c_int, + ) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_attr_setguardsize(attr: *mut crate::pthread_attr_t, guardsize: size_t) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_attr_setinheritsched( + attr: *mut crate::pthread_attr_t, + inheritsched: c_int, + ) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_attr_setschedparam( + attr: *mut crate::pthread_attr_t, + param: *const crate::sched_param, + ) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_attr_setschedpolicy(attr: *mut crate::pthread_attr_t, policy: c_int) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_barrier_destroy(barrier: *mut crate::pthread_barrier_t) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_barrier_init( + barrier: *mut crate::pthread_barrier_t, + attr: *const crate::pthread_barrierattr_t, + count: c_uint, + ) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_barrier_wait(barrier: *mut crate::pthread_barrier_t) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_barrierattr_destroy(attr: *mut crate::pthread_barrierattr_t) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_barrierattr_getpshared( + attr: *const crate::pthread_barrierattr_t, + shared: *mut c_int, + ) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_barrierattr_init(attr: *mut crate::pthread_barrierattr_t) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_barrierattr_setpshared( + attr: *mut crate::pthread_barrierattr_t, + shared: c_int, + ) -> c_int; + + #[cfg(all(target_os = "linux", not(target_env = "ohos")))] + pub fn pthread_cancel(thread: crate::pthread_t) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_condattr_getpshared( + attr: *const crate::pthread_condattr_t, + pshared: *mut c_int, + ) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_create( + native: *mut crate::pthread_t, + attr: *const crate::pthread_attr_t, + f: extern "C" fn(*mut c_void) -> *mut c_void, + value: *mut c_void, + ) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_getcpuclockid(thread: crate::pthread_t, clk_id: *mut crate::clockid_t) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_getschedparam( + native: crate::pthread_t, + policy: *mut c_int, + param: *mut crate::sched_param, + ) -> c_int; + + // FIXME(reorg): In recent POSIX versions, this is a signal.h function and not required + // in pthread. + #[cfg(target_os = "linux")] + pub fn pthread_kill(thread: crate::pthread_t, sig: c_int) -> c_int; + + #[cfg(all(target_os = "linux", not(target_env = "ohos")))] + pub fn pthread_mutex_consistent(mutex: *mut crate::pthread_mutex_t) -> c_int; + + #[cfg(target_os = "linux")] + #[cfg_attr(gnu_time_bits64, link_name = "__pthread_mutex_timedlock64")] + pub fn pthread_mutex_timedlock( + lock: *mut crate::pthread_mutex_t, + abstime: *const crate::timespec, + ) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_mutexattr_getprotocol( + attr: *const crate::pthread_mutexattr_t, + protocol: *mut c_int, + ) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_mutexattr_getpshared( + attr: *const crate::pthread_mutexattr_t, + pshared: *mut c_int, + ) -> c_int; + + #[cfg(all(target_os = "linux", not(target_env = "ohos")))] + pub fn pthread_mutexattr_getrobust( + attr: *const crate::pthread_mutexattr_t, + robustness: *mut c_int, + ) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_mutexattr_setprotocol( + attr: *mut crate::pthread_mutexattr_t, + protocol: c_int, + ) -> c_int; + + #[cfg(all(target_os = "linux", not(target_env = "ohos")))] + pub fn pthread_mutexattr_setrobust( + attr: *mut crate::pthread_mutexattr_t, + robustness: c_int, + ) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_once(control: *mut crate::pthread_once_t, routine: extern "C" fn()) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_setschedparam( + native: crate::pthread_t, + policy: c_int, + param: *const crate::sched_param, + ) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_setschedprio(native: crate::pthread_t, priority: c_int) -> c_int; + + // FIXME(reorg): In recent POSIX versions, this is a signal.h function and not required + // in pthread. + #[cfg(target_os = "linux")] + pub fn pthread_sigmask( + how: c_int, + set: *const crate::sigset_t, + oldset: *mut crate::sigset_t, + ) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_spin_destroy(lock: *mut crate::pthread_spinlock_t) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_spin_init(lock: *mut crate::pthread_spinlock_t, pshared: c_int) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_spin_lock(lock: *mut crate::pthread_spinlock_t) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_spin_trylock(lock: *mut crate::pthread_spinlock_t) -> c_int; + + #[cfg(target_os = "linux")] + pub fn pthread_spin_unlock(lock: *mut crate::pthread_spinlock_t) -> c_int; +} diff --git a/src/new/glibc/mod.rs b/src/new/glibc/mod.rs index 534aba86a493a..71d979b17ecc4 100644 --- a/src/new/glibc/mod.rs +++ b/src/new/glibc/mod.rs @@ -17,9 +17,15 @@ mod posix { /// /// mod sysdeps { + // FIXME(pthread): eventually all platforms should use this module + #[cfg(target_os = "linux")] + pub(crate) mod nptl; pub(crate) mod unix; } pub(crate) use posix::*; +// FIXME(pthread): eventually all platforms should use this module +#[cfg(target_os = "linux")] +pub(crate) use sysdeps::nptl::*; #[cfg(target_os = "linux")] pub(crate) use sysdeps::unix::linux::*; diff --git a/src/new/glibc/sysdeps/nptl/mod.rs b/src/new/glibc/sysdeps/nptl/mod.rs new file mode 100644 index 0000000000000..18e82e48b80a7 --- /dev/null +++ b/src/new/glibc/sysdeps/nptl/mod.rs @@ -0,0 +1,7 @@ +//! Source directory: `sysdeps/nptl/`o +//! +//! Native POSIX threading library. +//! +//! + +pub(crate) mod pthread; diff --git a/src/new/glibc/sysdeps/nptl/pthread.rs b/src/new/glibc/sysdeps/nptl/pthread.rs new file mode 100644 index 0000000000000..5548aed823180 --- /dev/null +++ b/src/new/glibc/sysdeps/nptl/pthread.rs @@ -0,0 +1,50 @@ +//! Source header: `sysdeps/nptl/pthread.h` +//! +//! + +pub use crate::new::common::linux_like::pthread::{ + pthread_getaffinity_np, + pthread_getname_np, + pthread_setaffinity_np, + pthread_setname_np, +}; +pub use crate::new::common::posix::pthread::{ + pthread_atfork, + pthread_attr_getguardsize, + pthread_attr_getinheritsched, + pthread_attr_getschedparam, + pthread_attr_getschedpolicy, + pthread_attr_setguardsize, + pthread_attr_setinheritsched, + pthread_attr_setschedparam, + pthread_attr_setschedpolicy, + pthread_barrier_destroy, + pthread_barrier_init, + pthread_barrier_wait, + pthread_barrierattr_destroy, + pthread_barrierattr_getpshared, + pthread_barrierattr_init, + pthread_barrierattr_setpshared, + pthread_cancel, + pthread_condattr_getpshared, + pthread_create, + pthread_getcpuclockid, + pthread_getschedparam, + pthread_kill, + pthread_mutex_consistent, + pthread_mutex_timedlock, + pthread_mutexattr_getprotocol, + pthread_mutexattr_getpshared, + pthread_mutexattr_getrobust, + pthread_mutexattr_setprotocol, + pthread_mutexattr_setrobust, + pthread_once, + pthread_setschedparam, + pthread_setschedprio, + pthread_sigmask, + pthread_spin_destroy, + pthread_spin_init, + pthread_spin_lock, + pthread_spin_trylock, + pthread_spin_unlock, +}; diff --git a/src/new/mod.rs b/src/new/mod.rs index 38a0759afb65d..ed25ec630581a 100644 --- a/src/new/mod.rs +++ b/src/new/mod.rs @@ -203,5 +203,12 @@ cfg_if! { } } -#[cfg(target_family = "unix")] -pub use unistd::*; +// Per-family headers we export +cfg_if! { + if #[cfg(target_family = "unix")] { + // FIXME(pthread): eventually all platforms should use this module + #[cfg(target_os = "linux")] + pub use pthread::*; + pub use unistd::*; + } +} diff --git a/src/new/musl/mod.rs b/src/new/musl/mod.rs index d6297a8d27dd8..9fd4d8e96100d 100644 --- a/src/new/musl/mod.rs +++ b/src/new/musl/mod.rs @@ -20,6 +20,8 @@ pub(crate) mod bits { } } +pub(crate) mod pthread; + /// Directory: `sys/` /// /// diff --git a/src/new/musl/pthread.rs b/src/new/musl/pthread.rs new file mode 100644 index 0000000000000..7db80b0bbf716 --- /dev/null +++ b/src/new/musl/pthread.rs @@ -0,0 +1,53 @@ +//! Header: `pthread.h` +//! +//! + +pub use crate::new::common::linux_like::pthread::{ + pthread_getaffinity_np, + pthread_getname_np, + pthread_setaffinity_np, + pthread_setname_np, +}; +pub use crate::new::common::posix::pthread::{ + pthread_atfork, + pthread_attr_getguardsize, + pthread_attr_getinheritsched, + pthread_attr_getschedparam, + pthread_attr_getschedpolicy, + pthread_attr_setguardsize, + pthread_attr_setinheritsched, + pthread_attr_setschedparam, + pthread_attr_setschedpolicy, + pthread_barrier_destroy, + pthread_barrier_init, + pthread_barrier_wait, + pthread_barrierattr_destroy, + pthread_barrierattr_getpshared, + pthread_barrierattr_init, + pthread_barrierattr_setpshared, + pthread_condattr_getpshared, + pthread_create, + pthread_getcpuclockid, + pthread_getschedparam, + pthread_kill, + pthread_mutex_timedlock, + pthread_mutexattr_getprotocol, + pthread_mutexattr_getpshared, + pthread_mutexattr_setprotocol, + pthread_once, + pthread_setschedparam, + pthread_setschedprio, + pthread_sigmask, + pthread_spin_destroy, + pthread_spin_init, + pthread_spin_lock, + pthread_spin_trylock, + pthread_spin_unlock, +}; +#[cfg(not(target_env = "ohos"))] +pub use crate::new::common::posix::pthread::{ + pthread_cancel, + pthread_mutex_consistent, + pthread_mutexattr_getrobust, + pthread_mutexattr_setrobust, +}; diff --git a/src/new/uclibc/mod.rs b/src/new/uclibc/mod.rs index 4cb25389c91bf..f51ef6cc7ecee 100644 --- a/src/new/uclibc/mod.rs +++ b/src/new/uclibc/mod.rs @@ -3,4 +3,6 @@ //! * About: //! * Headers: (mirror) +#[cfg(target_os = "linux")] +pub(crate) mod pthread; pub(crate) mod unistd; diff --git a/src/new/uclibc/pthread.rs b/src/new/uclibc/pthread.rs new file mode 100644 index 0000000000000..8163be7916aec --- /dev/null +++ b/src/new/uclibc/pthread.rs @@ -0,0 +1,48 @@ +//! Header: `pthread.h` + +pub use crate::new::common::linux_like::pthread::{ + pthread_getaffinity_np, + pthread_getname_np, + pthread_setaffinity_np, + pthread_setname_np, +}; +pub use crate::new::common::posix::pthread::{ + pthread_atfork, + pthread_attr_getguardsize, + pthread_attr_getinheritsched, + pthread_attr_getschedparam, + pthread_attr_getschedpolicy, + pthread_attr_setguardsize, + pthread_attr_setinheritsched, + pthread_attr_setschedparam, + pthread_attr_setschedpolicy, + pthread_barrier_destroy, + pthread_barrier_init, + pthread_barrier_wait, + pthread_barrierattr_destroy, + pthread_barrierattr_getpshared, + pthread_barrierattr_init, + pthread_barrierattr_setpshared, + pthread_cancel, + pthread_condattr_getpshared, + pthread_create, + pthread_getcpuclockid, + pthread_getschedparam, + pthread_kill, + pthread_mutex_consistent, + pthread_mutex_timedlock, + pthread_mutexattr_getprotocol, + pthread_mutexattr_getpshared, + pthread_mutexattr_getrobust, + pthread_mutexattr_setprotocol, + pthread_mutexattr_setrobust, + pthread_once, + pthread_setschedparam, + pthread_setschedprio, + pthread_sigmask, + pthread_spin_destroy, + pthread_spin_init, + pthread_spin_lock, + pthread_spin_trylock, + pthread_spin_unlock, +}; diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index 3c51650f14617..fc5326e870990 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -5807,17 +5807,6 @@ cfg_if! { newattr: *const crate::mq_attr, oldattr: *mut crate::mq_attr, ) -> c_int; - - pub fn pthread_mutex_consistent(mutex: *mut pthread_mutex_t) -> c_int; - pub fn pthread_cancel(thread: crate::pthread_t) -> c_int; - pub fn pthread_mutexattr_getrobust( - attr: *const pthread_mutexattr_t, - robustness: *mut c_int, - ) -> c_int; - pub fn pthread_mutexattr_setrobust( - attr: *mut pthread_mutexattr_t, - robustness: c_int, - ) -> c_int; } } } @@ -5972,17 +5961,6 @@ extern "C" { len: *mut crate::socklen_t, flg: c_int, ) -> c_int; - pub fn pthread_getaffinity_np( - thread: crate::pthread_t, - cpusetsize: size_t, - cpuset: *mut crate::cpu_set_t, - ) -> c_int; - pub fn pthread_setaffinity_np( - thread: crate::pthread_t, - cpusetsize: size_t, - cpuset: *const crate::cpu_set_t, - ) -> c_int; - pub fn pthread_setschedprio(native: crate::pthread_t, priority: c_int) -> c_int; pub fn reboot(how_to: c_int) -> c_int; pub fn setfsgid(gid: crate::gid_t) -> c_int; pub fn setfsuid(uid: crate::uid_t) -> c_int; @@ -6069,11 +6047,6 @@ extern "C" { timeout: c_int, ) -> c_int; pub fn epoll_ctl(epfd: c_int, op: c_int, fd: c_int, event: *mut crate::epoll_event) -> c_int; - pub fn pthread_getschedparam( - native: crate::pthread_t, - policy: *mut c_int, - param: *mut crate::sched_param, - ) -> c_int; pub fn unshare(flags: c_int) -> c_int; pub fn umount(target: *const c_char) -> c_int; pub fn sched_get_priority_max(policy: c_int) -> c_int; @@ -6120,39 +6093,7 @@ extern "C" { timeout: *const crate::timespec, sigmask: *const sigset_t, ) -> c_int; - pub fn pthread_mutexattr_getprotocol( - attr: *const pthread_mutexattr_t, - protocol: *mut c_int, - ) -> c_int; - pub fn pthread_mutexattr_setprotocol(attr: *mut pthread_mutexattr_t, protocol: c_int) -> c_int; - #[cfg_attr(gnu_time_bits64, link_name = "__pthread_mutex_timedlock64")] - pub fn pthread_mutex_timedlock( - lock: *mut pthread_mutex_t, - abstime: *const crate::timespec, - ) -> c_int; - pub fn pthread_barrierattr_init(attr: *mut crate::pthread_barrierattr_t) -> c_int; - pub fn pthread_barrierattr_destroy(attr: *mut crate::pthread_barrierattr_t) -> c_int; - pub fn pthread_barrierattr_getpshared( - attr: *const crate::pthread_barrierattr_t, - shared: *mut c_int, - ) -> c_int; - pub fn pthread_barrierattr_setpshared( - attr: *mut crate::pthread_barrierattr_t, - shared: c_int, - ) -> c_int; - pub fn pthread_barrier_init( - barrier: *mut pthread_barrier_t, - attr: *const crate::pthread_barrierattr_t, - count: c_uint, - ) -> c_int; - pub fn pthread_barrier_destroy(barrier: *mut pthread_barrier_t) -> c_int; - pub fn pthread_barrier_wait(barrier: *mut pthread_barrier_t) -> c_int; - pub fn pthread_spin_init(lock: *mut crate::pthread_spinlock_t, pshared: c_int) -> c_int; - pub fn pthread_spin_destroy(lock: *mut crate::pthread_spinlock_t) -> c_int; - pub fn pthread_spin_lock(lock: *mut crate::pthread_spinlock_t) -> c_int; - pub fn pthread_spin_trylock(lock: *mut crate::pthread_spinlock_t) -> c_int; - pub fn pthread_spin_unlock(lock: *mut crate::pthread_spinlock_t) -> c_int; pub fn clone( cb: extern "C" fn(*mut c_void) -> c_int, child_stack: *mut c_void, @@ -6168,45 +6109,10 @@ extern "C" { rqtp: *const crate::timespec, rmtp: *mut crate::timespec, ) -> c_int; - pub fn pthread_attr_getguardsize( - attr: *const crate::pthread_attr_t, - guardsize: *mut size_t, - ) -> c_int; - pub fn pthread_attr_setguardsize(attr: *mut crate::pthread_attr_t, guardsize: size_t) -> c_int; - pub fn pthread_attr_getinheritsched( - attr: *const crate::pthread_attr_t, - inheritsched: *mut c_int, - ) -> c_int; - pub fn pthread_attr_setinheritsched( - attr: *mut crate::pthread_attr_t, - inheritsched: c_int, - ) -> c_int; - pub fn pthread_attr_getschedpolicy( - attr: *const crate::pthread_attr_t, - policy: *mut c_int, - ) -> c_int; - pub fn pthread_attr_setschedpolicy(attr: *mut crate::pthread_attr_t, policy: c_int) -> c_int; - pub fn pthread_attr_getschedparam( - attr: *const crate::pthread_attr_t, - param: *mut crate::sched_param, - ) -> c_int; - pub fn pthread_attr_setschedparam( - attr: *mut crate::pthread_attr_t, - param: *const crate::sched_param, - ) -> c_int; pub fn sethostname(name: *const c_char, len: size_t) -> c_int; pub fn sched_get_priority_min(policy: c_int) -> c_int; - pub fn pthread_condattr_getpshared( - attr: *const pthread_condattr_t, - pshared: *mut c_int, - ) -> c_int; pub fn sysinfo(info: *mut crate::sysinfo) -> c_int; pub fn umount2(target: *const c_char, flags: c_int) -> c_int; - pub fn pthread_setschedparam( - native: crate::pthread_t, - policy: c_int, - param: *const crate::sched_param, - ) -> c_int; pub fn swapon(path: *const c_char, swapflags: c_int) -> c_int; pub fn sched_setscheduler( pid: crate::pid_t, @@ -6234,10 +6140,8 @@ extern "C" { result: *mut *mut crate::group, ) -> c_int; pub fn initgroups(user: *const c_char, group: crate::gid_t) -> c_int; - pub fn pthread_sigmask(how: c_int, set: *const sigset_t, oldset: *mut sigset_t) -> c_int; pub fn sem_open(name: *const c_char, oflag: c_int, ...) -> *mut sem_t; pub fn getgrnam(name: *const c_char) -> *mut crate::group; - pub fn pthread_kill(thread: crate::pthread_t, sig: c_int) -> c_int; pub fn sem_unlink(name: *const c_char) -> c_int; pub fn daemon(nochdir: c_int, noclose: c_int) -> c_int; pub fn getpwnam_r( @@ -6255,11 +6159,6 @@ extern "C" { result: *mut *mut passwd, ) -> c_int; pub fn sigwait(set: *const sigset_t, sig: *mut c_int) -> c_int; - pub fn pthread_atfork( - prepare: Option, - parent: Option, - child: Option, - ) -> c_int; pub fn getgrgid(gid: crate::gid_t) -> *mut crate::group; pub fn getgrouplist( user: *const c_char, @@ -6267,18 +6166,8 @@ extern "C" { groups: *mut crate::gid_t, ngroups: *mut c_int, ) -> c_int; - pub fn pthread_mutexattr_getpshared( - attr: *const pthread_mutexattr_t, - pshared: *mut c_int, - ) -> c_int; pub fn popen(command: *const c_char, mode: *const c_char) -> *mut crate::FILE; pub fn faccessat(dirfd: c_int, pathname: *const c_char, mode: c_int, flags: c_int) -> c_int; - pub fn pthread_create( - native: *mut crate::pthread_t, - attr: *const crate::pthread_attr_t, - f: extern "C" fn(*mut c_void) -> *mut c_void, - value: *mut c_void, - ) -> c_int; pub fn dl_iterate_phdr( callback: Option< unsafe extern "C" fn( @@ -6431,7 +6320,6 @@ extern "C" { pub fn gethostid() -> c_long; - pub fn pthread_getcpuclockid(thread: crate::pthread_t, clk_id: *mut crate::clockid_t) -> c_int; pub fn memmem( haystack: *const c_void, haystacklen: size_t, @@ -6440,8 +6328,6 @@ extern "C" { ) -> *mut c_void; pub fn sched_getcpu() -> c_int; - pub fn pthread_getname_np(thread: crate::pthread_t, name: *mut c_char, len: size_t) -> c_int; - pub fn pthread_setname_np(thread: crate::pthread_t, name: *const c_char) -> c_int; pub fn getopt_long( argc: c_int, argv: *const *mut c_char, @@ -6450,8 +6336,6 @@ extern "C" { longindex: *mut c_int, ) -> c_int; - pub fn pthread_once(control: *mut pthread_once_t, routine: extern "C" fn()) -> c_int; - pub fn copy_file_range( fd_in: c_int, off_in: *mut off64_t,