|
10 | 10 | #[cfg(feature = "alloc")] |
11 | 11 | extern crate alloc; |
12 | 12 |
|
13 | | -macro_rules! cfg_target_has_atomic { |
14 | | - ($($item:item)*) => {$( |
15 | | - #[cfg(not(futures_no_atomic_cas))] |
16 | | - $item |
17 | | - )*}; |
18 | | -} |
19 | | - |
20 | 13 | mod spawn; |
21 | 14 | pub use crate::spawn::{LocalSpawn, Spawn, SpawnError}; |
22 | 15 |
|
23 | | -cfg_target_has_atomic! { |
24 | | - #[cfg(feature = "alloc")] |
25 | | - mod arc_wake; |
26 | | - #[cfg(feature = "alloc")] |
27 | | - pub use crate::arc_wake::ArcWake; |
28 | | - |
29 | | - #[cfg(feature = "alloc")] |
30 | | - mod waker; |
31 | | - #[cfg(feature = "alloc")] |
32 | | - pub use crate::waker::waker; |
33 | | - |
34 | | - #[cfg(feature = "alloc")] |
35 | | - mod waker_ref; |
36 | | - #[cfg(feature = "alloc")] |
37 | | - pub use crate::waker_ref::{waker_ref, WakerRef}; |
38 | | -} |
| 16 | +#[cfg(not(futures_no_atomic_cas))] |
| 17 | +#[cfg(feature = "alloc")] |
| 18 | +mod arc_wake; |
| 19 | +#[cfg(not(futures_no_atomic_cas))] |
| 20 | +#[cfg(feature = "alloc")] |
| 21 | +pub use crate::arc_wake::ArcWake; |
| 22 | + |
| 23 | +#[cfg(not(futures_no_atomic_cas))] |
| 24 | +#[cfg(feature = "alloc")] |
| 25 | +mod waker; |
| 26 | +#[cfg(not(futures_no_atomic_cas))] |
| 27 | +#[cfg(feature = "alloc")] |
| 28 | +pub use crate::waker::waker; |
| 29 | + |
| 30 | +#[cfg(not(futures_no_atomic_cas))] |
| 31 | +#[cfg(feature = "alloc")] |
| 32 | +mod waker_ref; |
| 33 | +#[cfg(not(futures_no_atomic_cas))] |
| 34 | +#[cfg(feature = "alloc")] |
| 35 | +pub use crate::waker_ref::{waker_ref, WakerRef}; |
39 | 36 |
|
40 | 37 | mod future_obj; |
41 | 38 | pub use crate::future_obj::{FutureObj, LocalFutureObj, UnsafeFutureObj}; |
|
0 commit comments