Debian Codegraph @

debian/rust-vendor/nix/src/sys/mod.rs

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