diff options
Diffstat (limited to 'embassy-executor/src/raw/mod.rs')
| -rw-r--r-- | embassy-executor/src/raw/mod.rs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/embassy-executor/src/raw/mod.rs b/embassy-executor/src/raw/mod.rs index 2e5941ef7..0dd247d30 100644 --- a/embassy-executor/src/raw/mod.rs +++ b/embassy-executor/src/raw/mod.rs | |||
| @@ -7,14 +7,7 @@ | |||
| 7 | //! Using this module requires respecting subtle safety contracts. If you can, prefer using the safe | 7 | //! Using this module requires respecting subtle safety contracts. If you can, prefer using the safe |
| 8 | //! [executor wrappers](crate::Executor) and the [`embassy_executor::task`](embassy_executor_macros::task) macro, which are fully safe. | 8 | //! [executor wrappers](crate::Executor) and the [`embassy_executor::task`](embassy_executor_macros::task) macro, which are fully safe. |
| 9 | 9 | ||
| 10 | #[cfg_attr( | 10 | #[cfg_attr(target_has_atomic = "ptr", path = "run_queue_atomics.rs")] |
| 11 | all(not(feature = "drs-scheduler"), target_has_atomic = "ptr"), | ||
| 12 | path = "run_queue_atomics.rs", | ||
| 13 | )] | ||
| 14 | #[cfg_attr( | ||
| 15 | all(feature = "drs-scheduler", target_has_atomic = "ptr"), | ||
| 16 | path = "run_queue_drs_atomics.rs", | ||
| 17 | )] | ||
| 18 | #[cfg_attr(not(target_has_atomic = "ptr"), path = "run_queue_critical_section.rs")] | 11 | #[cfg_attr(not(target_has_atomic = "ptr"), path = "run_queue_critical_section.rs")] |
| 19 | mod run_queue; | 12 | mod run_queue; |
| 20 | 13 | ||
| @@ -35,6 +28,9 @@ pub(crate) mod util; | |||
| 35 | #[cfg_attr(feature = "turbowakers", path = "waker_turbo.rs")] | 28 | #[cfg_attr(feature = "turbowakers", path = "waker_turbo.rs")] |
| 36 | mod waker; | 29 | mod waker; |
| 37 | 30 | ||
| 31 | #[cfg(feature = "drs-scheduler")] | ||
| 32 | mod deadline; | ||
| 33 | |||
| 38 | use core::future::Future; | 34 | use core::future::Future; |
| 39 | use core::marker::PhantomData; | 35 | use core::marker::PhantomData; |
| 40 | use core::mem; | 36 | use core::mem; |
| @@ -50,6 +46,9 @@ use embassy_executor_timer_queue::TimerQueueItem; | |||
| 50 | #[cfg(feature = "arch-avr")] | 46 | #[cfg(feature = "arch-avr")] |
| 51 | use portable_atomic::AtomicPtr; | 47 | use portable_atomic::AtomicPtr; |
| 52 | 48 | ||
| 49 | #[cfg(feature = "drs-scheduler")] | ||
| 50 | pub use deadline::Deadline; | ||
| 51 | |||
| 53 | use self::run_queue::{RunQueue, RunQueueItem}; | 52 | use self::run_queue::{RunQueue, RunQueueItem}; |
| 54 | use self::state::State; | 53 | use self::state::State; |
| 55 | use self::util::{SyncUnsafeCell, UninitCell}; | 54 | use self::util::{SyncUnsafeCell, UninitCell}; |
| @@ -62,9 +61,6 @@ extern "Rust" fn __embassy_time_queue_item_from_waker(waker: &Waker) -> &'static | |||
| 62 | unsafe { task_from_waker(waker).timer_queue_item() } | 61 | unsafe { task_from_waker(waker).timer_queue_item() } |
| 63 | } | 62 | } |
| 64 | 63 | ||
| 65 | #[cfg(feature = "drs-scheduler")] | ||
| 66 | pub use run_queue::Deadline; | ||
| 67 | |||
| 68 | /// Raw task header for use in task pointers. | 64 | /// Raw task header for use in task pointers. |
| 69 | /// | 65 | /// |
| 70 | /// A task can be in one of the following states: | 66 | /// A task can be in one of the following states: |
