nix/sys/
mod.rs

1//! Mostly platform-specific functionality
2#[cfg(any(
3    freebsdlike,
4    all(target_os = "linux", not(target_env = "uclibc")),
5    apple_targets,
6    target_os = "netbsd"
7))]
8feature! {
9    #![feature = "aio"]
10    pub mod aio;
11}
12
13feature! {
14    #![feature = "event"]
15
16    #[cfg(linux_android)]
17    #[allow(missing_docs)]
18    pub mod epoll;
19
20    #[cfg(bsd)]
21    pub mod event;
22
23    #[cfg(any(linux_android, target_os = "freebsd"))]
24    #[allow(missing_docs)]
25    pub mod eventfd;
26}
27
28#[cfg(target_os = "linux")]
29feature! {
30    #![feature = "fanotify"]
31    pub mod fanotify;
32}
33
34#[cfg(any(
35    bsd,
36    linux_android,
37    solarish,
38    target_os = "fuchsia",
39    target_os = "redox",
40))]
41#[cfg(feature = "ioctl")]
42#[cfg_attr(docsrs, doc(cfg(feature = "ioctl")))]
43#[macro_use]
44pub mod ioctl;
45
46#[cfg(any(linux_android, target_os = "freebsd"))]
47feature! {
48    #![feature = "fs"]
49    pub mod memfd;
50}
51
52#[cfg(not(target_os = "redox"))]
53feature! {
54    #![feature = "mman"]
55    pub mod mman;
56}
57
58#[cfg(target_os = "linux")]
59feature! {
60    #![feature = "personality"]
61    pub mod personality;
62}
63
64#[cfg(target_os = "linux")]
65feature! {
66    #![feature = "process"]
67    pub mod prctl;
68}
69
70feature! {
71    #![feature = "pthread"]
72    pub mod pthread;
73}
74
75#[cfg(any(linux_android, bsd))]
76feature! {
77    #![feature = "ptrace"]
78    #[allow(missing_docs)]
79    pub mod ptrace;
80}
81
82#[cfg(target_os = "linux")]
83feature! {
84    #![feature = "quota"]
85    pub mod quota;
86}
87
88#[cfg(any(target_os = "linux", netbsdlike))]
89feature! {
90    #![feature = "reboot"]
91    pub mod reboot;
92}
93
94#[cfg(not(any(
95    target_os = "redox",
96    target_os = "fuchsia",
97    solarish,
98    target_os = "haiku"
99)))]
100feature! {
101    #![feature = "resource"]
102    pub mod resource;
103}
104
105feature! {
106    #![feature = "poll"]
107    pub mod select;
108}
109
110#[cfg(any(linux_android, freebsdlike, apple_targets, solarish))]
111feature! {
112    #![feature = "zerocopy"]
113    pub mod sendfile;
114}
115
116pub mod signal;
117
118#[cfg(linux_android)]
119feature! {
120    #![feature = "signal"]
121    #[allow(missing_docs)]
122    pub mod signalfd;
123}
124
125feature! {
126    #![feature = "socket"]
127    #[allow(missing_docs)]
128    pub mod socket;
129}
130
131feature! {
132    #![feature = "fs"]
133    #[allow(missing_docs)]
134    pub mod stat;
135}
136
137#[cfg(any(linux_android, freebsdlike, apple_targets, target_os = "openbsd"))]
138feature! {
139    #![feature = "fs"]
140    pub mod statfs;
141}
142
143feature! {
144    #![feature = "fs"]
145    pub mod statvfs;
146}
147
148#[cfg(linux_android)]
149#[allow(missing_docs)]
150pub mod sysinfo;
151
152feature! {
153    #![feature = "term"]
154    #[allow(missing_docs)]
155    pub mod termios;
156}
157
158#[allow(missing_docs)]
159pub mod time;
160
161feature! {
162    #![feature = "uio"]
163    pub mod uio;
164}
165
166feature! {
167    #![feature = "feature"]
168    pub mod utsname;
169}
170
171feature! {
172    #![feature = "process"]
173    pub mod wait;
174}
175
176#[cfg(linux_android)]
177feature! {
178    #![feature = "inotify"]
179    pub mod inotify;
180}
181
182#[cfg(linux_android)]
183feature! {
184    #![feature = "time"]
185    pub mod timerfd;
186}
187
188#[cfg(all(
189    any(
190        target_os = "freebsd",
191        solarish,
192        target_os = "linux",
193        target_os = "netbsd"
194    ),
195    feature = "time",
196    feature = "signal"
197))]
198feature! {
199    #![feature = "time"]
200    pub mod timer;
201}