]>
Commit | Line | Data |
---|---|---|
064997fb FG |
1 | //! Process-associated operations. |
2 | ||
3 | #[cfg(not(target_os = "wasi"))] | |
4 | mod chdir; | |
5 | mod exit; | |
6 | #[cfg(not(target_os = "wasi"))] // WASI doesn't have get[gpu]id. | |
7 | mod id; | |
8 | #[cfg(not(target_os = "wasi"))] | |
9 | mod kill; | |
10 | #[cfg(any(target_os = "android", target_os = "linux"))] | |
11 | mod membarrier; | |
487cf647 FG |
12 | #[cfg(any(target_os = "android", target_os = "linux"))] |
13 | mod prctl; | |
064997fb FG |
14 | #[cfg(not(any(target_os = "fuchsia", target_os = "wasi")))] // WASI doesn't have [gs]etpriority. |
15 | mod priority; | |
487cf647 FG |
16 | #[cfg(target_os = "freebsd")] |
17 | mod procctl; | |
064997fb FG |
18 | #[cfg(not(any(target_os = "fuchsia", target_os = "redox", target_os = "wasi")))] |
19 | mod rlimit; | |
20 | #[cfg(any( | |
21 | target_os = "android", | |
22 | target_os = "dragonfly", | |
23 | target_os = "fuchsia", | |
24 | target_os = "linux", | |
25 | ))] | |
26 | mod sched; | |
27 | mod sched_yield; | |
28 | #[cfg(not(target_os = "wasi"))] // WASI doesn't have uname. | |
29 | mod uname; | |
30 | #[cfg(not(target_os = "wasi"))] | |
31 | mod wait; | |
32 | ||
33 | #[cfg(not(target_os = "wasi"))] | |
34 | pub use chdir::chdir; | |
35 | #[cfg(not(any(target_os = "wasi", target_os = "fuchsia")))] | |
36 | pub use chdir::fchdir; | |
37 | #[cfg(not(target_os = "wasi"))] | |
38 | pub use chdir::getcwd; | |
39 | #[cfg(not(target_os = "wasi"))] | |
40 | pub use exit::EXIT_SIGNALED_SIGABRT; | |
41 | pub use exit::{EXIT_FAILURE, EXIT_SUCCESS}; | |
42 | #[cfg(any(target_os = "android", target_os = "linux"))] | |
43 | pub use id::Cpuid; | |
44 | #[cfg(not(target_os = "wasi"))] | |
45 | pub use id::{ | |
487cf647 FG |
46 | getegid, geteuid, getgid, getpgid, getpgrp, getpid, getppid, getuid, setsid, Gid, Pid, RawGid, |
47 | RawNonZeroPid, RawPid, RawUid, Uid, | |
064997fb FG |
48 | }; |
49 | #[cfg(not(target_os = "wasi"))] | |
50 | pub use kill::{kill_current_process_group, kill_process, kill_process_group, Signal}; | |
51 | #[cfg(any(target_os = "android", target_os = "linux"))] | |
52 | pub use membarrier::{ | |
53 | membarrier, membarrier_cpu, membarrier_query, MembarrierCommand, MembarrierQuery, | |
54 | }; | |
487cf647 FG |
55 | #[cfg(any(target_os = "android", target_os = "linux"))] |
56 | pub use prctl::*; | |
064997fb FG |
57 | #[cfg(not(any(target_os = "fuchsia", target_os = "wasi")))] |
58 | pub use priority::nice; | |
59 | #[cfg(not(any(target_os = "fuchsia", target_os = "redox", target_os = "wasi")))] | |
60 | pub use priority::{ | |
61 | getpriority_pgrp, getpriority_process, getpriority_user, setpriority_pgrp, setpriority_process, | |
62 | setpriority_user, | |
63 | }; | |
487cf647 FG |
64 | #[cfg(target_os = "freebsd")] |
65 | pub use procctl::*; | |
064997fb FG |
66 | #[cfg(any(target_os = "android", target_os = "linux"))] |
67 | pub use rlimit::prlimit; | |
68 | #[cfg(not(any(target_os = "fuchsia", target_os = "redox", target_os = "wasi")))] | |
69 | pub use rlimit::{getrlimit, setrlimit, Resource, Rlimit}; | |
70 | #[cfg(any( | |
71 | target_os = "android", | |
72 | target_os = "dragonfly", | |
73 | target_os = "fuchsia", | |
74 | target_os = "linux", | |
75 | ))] | |
76 | pub use sched::{sched_getaffinity, sched_setaffinity, CpuSet}; | |
77 | pub use sched_yield::sched_yield; | |
78 | #[cfg(not(target_os = "wasi"))] | |
79 | pub use uname::{uname, Uname}; | |
80 | #[cfg(not(target_os = "wasi"))] | |
81 | pub use wait::{wait, waitpid, WaitOptions, WaitStatus}; | |
82 | ||
83 | #[cfg(not(target_os = "wasi"))] | |
487cf647 | 84 | #[cfg(feature = "fs")] |
064997fb | 85 | pub(crate) use id::translate_fchown_args; |