From 82d051e8e967522af735fff47a1738ce4952f950 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Mon, 22 Feb 2021 20:59:03 +0100 Subject: Added enable/disable timer calls --- src/tq.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/tq.rs b/src/tq.rs index 541ffcd..a637007 100644 --- a/src/tq.rs +++ b/src/tq.rs @@ -29,6 +29,7 @@ where nr: NotReady, 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 -- cgit v1.2.3