diff options
| author | Jorge Iglesias Garcia <44316552+jorgeig-space@users.noreply.github.com> | 2021-08-27 11:16:51 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-27 11:16:51 +0800 |
| commit | 77427f962dec01b3aa49a5e4a2a77293794d8f2e (patch) | |
| tree | a0844994c04e264343571f916f81e87f4bc4e4ad /src/tq.rs | |
| parent | a4b6fb3404bbdbb853cc3fe6c7a110ddc3beb1a7 (diff) | |
| parent | 22ec841ee14cc313b1725ff6ab6de1b5706d2824 (diff) | |
Merge branch 'rtic-rs:master' into master
Diffstat (limited to 'src/tq.rs')
| -rw-r--r-- | src/tq.rs | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -1,9 +1,9 @@ use crate::{ - linked_list::{LinkedList, Min}, time::{Clock, Instant}, Monotonic, }; use core::cmp::Ordering; +use heapless::sorted_linked_list::{LinkedIndexU16, Min, SortedLinkedList}; #[inline(always)] fn unwrapper<T, E>(val: Result<T, E>) -> T { @@ -14,7 +14,9 @@ fn unwrapper<T, E>(val: Result<T, E>) -> T { } } -pub struct TimerQueue<Mono, Task, const N: usize>(pub LinkedList<NotReady<Mono, Task>, Min, N>) +pub struct TimerQueue<Mono, Task, const N: usize>( + pub SortedLinkedList<NotReady<Mono, Task>, LinkedIndexU16, Min, N>, +) where Mono: Monotonic, Task: Copy; @@ -24,10 +26,6 @@ where Mono: Monotonic, Task: Copy, { - pub fn new() -> Self { - TimerQueue(LinkedList::new()) - } - /// # Safety /// /// Writing to memory with a transmute in order to enable |
