diff --git a/Cargo.toml b/Cargo.toml index 01877674c4..4e3d6731fb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,7 +60,6 @@ compiletest_rs = "0.3.5" [dev-dependencies] panic-abort = "0.1.1" -panic-itm = "0.1.0" typenum = "1.10.0" [dev-dependencies.stm32f103xx] diff --git a/ci/script.sh b/ci/script.sh index 9e91aad5e8..58a0784a8d 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -7,15 +7,31 @@ main() { return fi + # examples that don't require the timer-queue feature + local examples=( + async + empty + interrupt + ) + case $TARGET in thumbv7em-none-eabi*) cargo check --target $TARGET --features cm7-r0p1 - cargo check --target $TARGET --features cm7-r0p1 --examples + for ex in ${examples[@]}; do + cargo check --target $TARGET --features cm7-r0p1 --example $ex + done + + cargo check timer-queue --target $TARGET --features "cm7-r0p1 timer-queue" + cargo check --target $TARGET --features "cm7-r0p1 timer-queue" --examples ;; esac cargo check --target $TARGET - cargo check --target $TARGET --examples + for ex in ${examples[@]}; do + cargo check --target $TARGET --features cm7-r0p1 --example $ex + done + cargo check --features timer-queue --target $TARGET + cargo check --features timer-queue --target $TARGET --examples } main diff --git a/examples/periodic-payload.rs b/examples/periodic-payload.rs index 7b09e91c82..24a203f9c7 100644 --- a/examples/periodic-payload.rs +++ b/examples/periodic-payload.rs @@ -1,3 +1,5 @@ +// 52 bytes .bss +// // # -Os // init // a(bl=8000000, now=8000180, input=0) diff --git a/examples/periodic-preemption-payload.rs b/examples/periodic-preemption-payload.rs index 9f3bbb2b1f..5b1b143782 100644 --- a/examples/periodic-preemption-payload.rs +++ b/examples/periodic-preemption-payload.rs @@ -1,3 +1,5 @@ +// 104 bytes .bss +// // # -Os // a(bl=16000000, now=16000248, input=0) // b(bl=24000000, now=24000251, input=0) diff --git a/examples/periodic-preemption.rs b/examples/periodic-preemption.rs index 08ad528c05..968e8be72f 100644 --- a/examples/periodic-preemption.rs +++ b/examples/periodic-preemption.rs @@ -1,3 +1,5 @@ +// 96 bytes .bss +// // # -Os // init // a(bl=16000000, now=16000249) diff --git a/examples/periodic.rs b/examples/periodic.rs index e086e0ae94..2d8d43ecc3 100644 --- a/examples/periodic.rs +++ b/examples/periodic.rs @@ -1,3 +1,5 @@ +// 52 bytes .bss +// // # -Os // init // a(bl=8000000, now=8000180) diff --git a/src/node.rs b/src/node.rs index 9010b37bf0..43794a8d4a 100644 --- a/src/node.rs +++ b/src/node.rs @@ -14,6 +14,30 @@ where payload: T, } +#[cfg(feature = "timer-queue")] +impl Eq for Node {} + +#[cfg(feature = "timer-queue")] +impl PartialEq for Node { + fn eq(&self, other: &Node) -> bool { + self.baseline == other.baseline + } +} + +#[cfg(feature = "timer-queue")] +impl Ord for Node { + fn cmp(&self, other: &Node) -> Ordering { + self.baseline.cmp(&other.baseline) + } +} + +#[cfg(feature = "timer-queue")] +impl PartialOrd for Node { + fn partial_cmp(&self, other: &Node) -> Option { + Some(self.cmp(other)) + } +} + #[doc(hidden)] pub struct Slot where