aboutsummaryrefslogtreecommitdiff
path: root/embassy-executor/src/raw/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-executor/src/raw/mod.rs')
-rw-r--r--embassy-executor/src/raw/mod.rs18
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")]
19mod run_queue; 12mod 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")]
36mod waker; 29mod waker;
37 30
31#[cfg(feature = "drs-scheduler")]
32mod deadline;
33
38use core::future::Future; 34use core::future::Future;
39use core::marker::PhantomData; 35use core::marker::PhantomData;
40use core::mem; 36use core::mem;
@@ -50,6 +46,9 @@ use embassy_executor_timer_queue::TimerQueueItem;
50#[cfg(feature = "arch-avr")] 46#[cfg(feature = "arch-avr")]
51use portable_atomic::AtomicPtr; 47use portable_atomic::AtomicPtr;
52 48
49#[cfg(feature = "drs-scheduler")]
50pub use deadline::Deadline;
51
53use self::run_queue::{RunQueue, RunQueueItem}; 52use self::run_queue::{RunQueue, RunQueueItem};
54use self::state::State; 53use self::state::State;
55use self::util::{SyncUnsafeCell, UninitCell}; 54use 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")]
66pub 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: