• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 cfg_io_driver! {
2     pub(crate) mod bit;
3     pub(crate) mod slab;
4 }
5 
6 #[cfg(any(
7     // io driver uses `WakeList` directly
8     feature = "net",
9     feature = "process",
10     // `sync` enables `Notify` and `batch_semaphore`, which require `WakeList`.
11     feature = "sync",
12     // `fs` uses `batch_semaphore`, which requires `WakeList`.
13     feature = "fs",
14     // rt and signal use `Notify`, which requires `WakeList`.
15     feature = "rt",
16     feature = "signal",
17 ))]
18 mod wake_list;
19 #[cfg(any(
20     feature = "net",
21     feature = "process",
22     feature = "sync",
23     feature = "fs",
24     feature = "rt",
25     feature = "signal",
26 ))]
27 pub(crate) use wake_list::WakeList;
28 
29 #[cfg(any(
30     feature = "fs",
31     feature = "net",
32     feature = "process",
33     feature = "rt",
34     feature = "sync",
35     feature = "signal",
36     feature = "time",
37 ))]
38 pub(crate) mod linked_list;
39 
40 #[cfg(any(feature = "rt-multi-thread", feature = "macros"))]
41 mod rand;
42 
43 cfg_rt! {
44     mod wake;
45     pub(crate) use wake::WakerRef;
46     pub(crate) use wake::{waker_ref, Wake};
47 
48     mod sync_wrapper;
49     pub(crate) use sync_wrapper::SyncWrapper;
50 
51     mod vec_deque_cell;
52     pub(crate) use vec_deque_cell::VecDequeCell;
53 }
54 
55 cfg_rt_multi_thread! {
56     pub(crate) use self::rand::FastRand;
57 
58     mod try_lock;
59     pub(crate) use try_lock::TryLock;
60 }
61 
62 pub(crate) mod trace;
63 
64 #[cfg(any(feature = "macros"))]
65 #[cfg_attr(not(feature = "macros"), allow(unreachable_pub))]
66 pub use self::rand::thread_rng_n;
67 
68 #[cfg(any(
69     feature = "rt",
70     feature = "time",
71     feature = "net",
72     feature = "process",
73     all(unix, feature = "signal")
74 ))]
75 pub(crate) mod error;
76