1 //! Process-associated operations.
3 #[cfg(not(target_os = "wasi"))]
6 #[cfg(not(target_os = "wasi"))] // WASI doesn't have get[gpu]id.
8 #[cfg(not(target_os = "wasi"))]
10 #[cfg(any(target_os = "android", target_os = "linux"))]
12 #[cfg(not(any(target_os = "fuchsia", target_os = "wasi")))] // WASI doesn't have [gs]etpriority.
14 #[cfg(not(any(target_os = "fuchsia", target_os = "redox", target_os = "wasi")))]
17 target_os
= "android",
18 target_os
= "dragonfly",
19 target_os
= "fuchsia",
24 #[cfg(not(target_os = "wasi"))] // WASI doesn't have uname.
26 #[cfg(not(target_os = "wasi"))]
29 #[cfg(not(target_os = "wasi"))]
31 #[cfg(not(any(target_os = "wasi", target_os = "fuchsia")))]
32 pub use chdir
::fchdir
;
33 #[cfg(not(target_os = "wasi"))]
34 pub use chdir
::getcwd
;
35 #[cfg(not(target_os = "wasi"))]
36 pub use exit
::EXIT_SIGNALED_SIGABRT
;
37 pub use exit
::{EXIT_FAILURE, EXIT_SUCCESS}
;
38 #[cfg(any(target_os = "android", target_os = "linux"))]
40 #[cfg(not(target_os = "wasi"))]
42 getegid
, geteuid
, getgid
, getpid
, getppid
, getuid
, setsid
, Gid
, Pid
, RawGid
, RawNonZeroPid
,
45 #[cfg(not(target_os = "wasi"))]
46 pub use kill
::{kill_current_process_group, kill_process, kill_process_group, Signal}
;
47 #[cfg(any(target_os = "android", target_os = "linux"))]
49 membarrier
, membarrier_cpu
, membarrier_query
, MembarrierCommand
, MembarrierQuery
,
51 #[cfg(not(any(target_os = "fuchsia", target_os = "wasi")))]
52 pub use priority
::nice
;
53 #[cfg(not(any(target_os = "fuchsia", target_os = "redox", target_os = "wasi")))]
55 getpriority_pgrp
, getpriority_process
, getpriority_user
, setpriority_pgrp
, setpriority_process
,
58 #[cfg(any(target_os = "android", target_os = "linux"))]
59 pub use rlimit
::prlimit
;
60 #[cfg(not(any(target_os = "fuchsia", target_os = "redox", target_os = "wasi")))]
61 pub use rlimit
::{getrlimit, setrlimit, Resource, Rlimit}
;
63 target_os
= "android",
64 target_os
= "dragonfly",
65 target_os
= "fuchsia",
68 pub use sched
::{sched_getaffinity, sched_setaffinity, CpuSet}
;
69 pub use sched_yield
::sched_yield
;
70 #[cfg(not(target_os = "wasi"))]
71 pub use uname
::{uname, Uname}
;
72 #[cfg(not(target_os = "wasi"))]
73 pub use wait
::{wait, waitpid, WaitOptions, WaitStatus}
;
75 #[cfg(not(target_os = "wasi"))]
76 pub(crate) use id
::translate_fchown_args
;