1#[cfg(any(
2 target_os = "android",
3 target_os = "illumos",
4 target_os = "linux",
5 target_os = "redox",
6))]
7mod epoll;
8
9#[cfg(any(
10 target_os = "android",
11 target_os = "illumos",
12 target_os = "linux",
13 target_os = "redox",
14))]
15pub(crate) use self::epoll::{event, Event, Events, Selector};
16
17#[cfg(any(
18 target_os = "dragonfly",
19 target_os = "freebsd",
20 target_os = "ios",
21 target_os = "macos",
22 target_os = "netbsd",
23 target_os = "openbsd",
24 target_os = "tvos",
25 target_os = "watchos",
26))]
27mod kqueue;
28
29#[cfg(any(
30 target_os = "dragonfly",
31 target_os = "freebsd",
32 target_os = "ios",
33 target_os = "macos",
34 target_os = "netbsd",
35 target_os = "openbsd",
36 target_os = "tvos",
37 target_os = "watchos",
38))]
39pub(crate) use self::kqueue::{event, Event, Events, Selector};
40
41/// Lowest file descriptor used in `Selector::try_clone`.
42///
43/// # Notes
44///
45/// Usually fds 0, 1 and 2 are standard in, out and error. Some application
46/// blindly assume this to be true, which means using any one of those a select
47/// could result in some interesting and unexpected errors. Avoid that by using
48/// an fd that doesn't have a pre-determined usage.
49const LOWEST_FD: libc::c_int = 3;
50