xref: /third_party/rust/crates/rustix/src/thread/mod.rs (revision b8a62b91)
1//! Thread-associated operations.
2
3#[cfg(not(target_os = "redox"))]
4mod clock;
5#[cfg(linux_raw)]
6mod futex;
7#[cfg(any(target_os = "android", target_os = "linux"))]
8mod id;
9#[cfg(any(target_os = "android", target_os = "linux"))]
10mod prctl;
11#[cfg(any(target_os = "android", target_os = "linux"))]
12mod setns;
13
14#[cfg(not(any(
15    target_os = "dragonfly",
16    target_os = "emscripten",
17    target_os = "freebsd",
18    target_os = "haiku",
19    target_os = "ios",
20    target_os = "macos",
21    target_os = "openbsd",
22    target_os = "redox",
23    target_os = "wasi",
24)))]
25pub use clock::{clock_nanosleep_absolute, clock_nanosleep_relative, ClockId};
26#[cfg(not(target_os = "redox"))]
27pub use clock::{nanosleep, NanosleepRelativeResult, Timespec};
28#[cfg(linux_raw)]
29pub use futex::{futex, FutexFlags, FutexOperation};
30#[cfg(any(target_os = "android", target_os = "linux"))]
31pub use id::gettid;
32#[cfg(any(target_os = "android", target_os = "linux"))]
33pub use prctl::*;
34#[cfg(any(target_os = "android", target_os = "linux"))]
35pub use setns::*;
36