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