diff options
| author | ivmarkov <[email protected]> | 2022-10-26 18:05:27 +0300 |
|---|---|---|
| committer | ivmarkov <[email protected]> | 2022-10-26 18:05:27 +0300 |
| commit | 560eecdb737642e6aba132408039195c7d6b6dd8 (patch) | |
| tree | 3ce929eb47432278cb8263a8684acea3ffc634ea /embassy-executor | |
| parent | ac6995f9e656a724d92590e722ac0c25f417893b (diff) | |
Remove the _embassy_time_schedule_wake magic
Diffstat (limited to 'embassy-executor')
| -rw-r--r-- | embassy-executor/src/raw/mod.rs | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/embassy-executor/src/raw/mod.rs b/embassy-executor/src/raw/mod.rs index 5bcb1e6e7..181dabe8e 100644 --- a/embassy-executor/src/raw/mod.rs +++ b/embassy-executor/src/raw/mod.rs | |||
| @@ -444,14 +444,21 @@ pub unsafe fn wake_task(task: NonNull<TaskHeader>) { | |||
| 444 | } | 444 | } |
| 445 | 445 | ||
| 446 | #[cfg(feature = "integrated-timers")] | 446 | #[cfg(feature = "integrated-timers")] |
| 447 | #[no_mangle] | 447 | struct TimerQueue; |
| 448 | unsafe fn _embassy_time_schedule_wake(at: Instant, waker: &core::task::Waker) { | 448 | |
| 449 | let task = waker::task_from_waker(waker); | 449 | #[cfg(feature = "integrated-timers")] |
| 450 | let task = task.as_ref(); | 450 | impl embassy_time::queue::TimerQueue for TimerQueue { |
| 451 | let expires_at = task.expires_at.get(); | 451 | fn schedule_wake(&'static self, at: Instant, waker: &core::task::Waker) { |
| 452 | task.expires_at.set(expires_at.min(at)); | 452 | let task = waker::task_from_waker(waker); |
| 453 | let task = unsafe { task.as_ref() }; | ||
| 454 | let expires_at = task.expires_at.get(); | ||
| 455 | task.expires_at.set(expires_at.min(at)); | ||
| 456 | } | ||
| 453 | } | 457 | } |
| 454 | 458 | ||
| 459 | #[cfg(feature = "integrated-timers")] | ||
| 460 | embassy_time::timer_queue_impl!(static TIMER_QUEUE: TimerQueue = TimerQueue); | ||
| 461 | |||
| 455 | #[cfg(feature = "rtos-trace")] | 462 | #[cfg(feature = "rtos-trace")] |
| 456 | impl rtos_trace::RtosTraceOSCallbacks for Executor { | 463 | impl rtos_trace::RtosTraceOSCallbacks for Executor { |
| 457 | fn task_list() { | 464 | fn task_list() { |
