mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-18 22:05:37 +01:00
Fixed UB in spawn_at
This commit is contained in:
parent
2068eae928
commit
51500a1d70
4 changed files with 11 additions and 17 deletions
|
|
@ -42,7 +42,7 @@ where
|
|||
nr: NotReady<Mono, Task>,
|
||||
enable_interrupt: F1,
|
||||
pend_handler: F2,
|
||||
mono: &mut Mono,
|
||||
mono: Option<&mut Mono>,
|
||||
) where
|
||||
F1: FnOnce(),
|
||||
F2: FnOnce(),
|
||||
|
|
@ -57,7 +57,9 @@ where
|
|||
|
||||
if if_heap_max_greater_than_nr {
|
||||
if Mono::DISABLE_INTERRUPT_ON_EMPTY_QUEUE && self.0.is_empty() {
|
||||
mono.enable_timer();
|
||||
if let Some(mono) = mono {
|
||||
mono.enable_timer();
|
||||
}
|
||||
enable_interrupt();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue