aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Emil Fresk <emil.fresk@gmail.com> 2021-02-22 20:59:03 +0100
committerGravatar Emil Fresk <emil.fresk@gmail.com> 2021-02-22 20:59:03 +0100
commit82d051e8e967522af735fff47a1738ce4952f950 (patch)
treec4e921ef5d6203e732b8ec7a0b25b3ad42d05066 /src
parente52088bbd8f4f15b0d49ced8a24c5a2fc8c8c11f (diff)
downloadrtic-82d051e8e967522af735fff47a1738ce4952f950.tar.gz
rtic-82d051e8e967522af735fff47a1738ce4952f950.tar.zst
rtic-82d051e8e967522af735fff47a1738ce4952f950.zip
Added enable/disable timer calls
Diffstat (limited to 'src')
-rw-r--r--src/tq.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tq.rs b/src/tq.rs
index 541ffcd1..a637007d 100644
--- a/src/tq.rs
+++ b/src/tq.rs
@@ -29,6 +29,7 @@ where
nr: NotReady<Mono, Task>,
enable_interrupt: F1,
pend_handler: F2,
+ mono: &mut Mono,
) where
F1: FnOnce(),
F2: FnOnce(),
@@ -46,7 +47,8 @@ where
.unwrap_or(true);
if if_heap_max_greater_than_nr {
if Mono::DISABLE_INTERRUPT_ON_EMPTY_QUEUE && is_empty {
- // mem::transmute::<_, SYST>(()).enable_interrupt();
+ // mem::transmute::<_, SYST>(()).enable_interrupt();A
+ mono.enable_timer();
enable_interrupt();
}
@@ -108,6 +110,7 @@ where
// The queue is empty, disable the interrupt.
if Mono::DISABLE_INTERRUPT_ON_EMPTY_QUEUE {
disable_interrupt();
+ mono.disable_timer();
}
None