From bbed94528528fbfe53ed7baf9cc38ca012785d13 Mon Sep 17 00:00:00 2001 From: Finomnis Date: Wed, 6 Dec 2023 19:36:09 +0100 Subject: Fix race condition in `calculate_now` (#860) * Fix race condition in calculate_now * Add changelog * Update changelog * Refine comment * More comment fixes --- rtic-monotonics/src/stm32.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rtic-monotonics/src/stm32.rs') diff --git a/rtic-monotonics/src/stm32.rs b/rtic-monotonics/src/stm32.rs index 601196a..68f95a2 100644 --- a/rtic-monotonics/src/stm32.rs +++ b/rtic-monotonics/src/stm32.rs @@ -234,7 +234,7 @@ macro_rules! make_timer { fn now() -> Self::Instant { Self::Instant::from_ticks(calculate_now( - $overflow.load(Ordering::Relaxed), + || $overflow.load(Ordering::Relaxed), || $timer.cnt().read().cnt() )) } -- cgit v1.2.3