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