diff options
author | 2023-12-06 19:36:09 +0100 | |
---|---|---|
committer | 2023-12-06 18:36:09 +0000 | |
commit | bbed94528528fbfe53ed7baf9cc38ca012785d13 (patch) | |
tree | 45269ff41ff0007e2b405c5cbea2c3ba19928b46 /rtic-monotonics/src/nrf/timer.rs | |
parent | f377471e440d8be0b2f9e9c8877ed015f62dc19e (diff) | |
download | rtic-bbed94528528fbfe53ed7baf9cc38ca012785d13.tar.gz rtic-bbed94528528fbfe53ed7baf9cc38ca012785d13.tar.zst rtic-bbed94528528fbfe53ed7baf9cc38ca012785d13.zip |
Fix race condition in `calculate_now` (#860)
* Fix race condition in calculate_now
* Add changelog
* Update changelog
* Refine comment
* More comment fixes
Diffstat (limited to 'rtic-monotonics/src/nrf/timer.rs')
-rw-r--r-- | rtic-monotonics/src/nrf/timer.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rtic-monotonics/src/nrf/timer.rs b/rtic-monotonics/src/nrf/timer.rs index 2f83f40b..7b760e4c 100644 --- a/rtic-monotonics/src/nrf/timer.rs +++ b/rtic-monotonics/src/nrf/timer.rs @@ -242,7 +242,7 @@ macro_rules! make_timer { let timer = unsafe { &*$timer::PTR }; Self::Instant::from_ticks(calculate_now( - $overflow.load(Ordering::Relaxed), + || $overflow.load(Ordering::Relaxed), || { timer.tasks_capture[3].write(|w| unsafe { w.bits(1) }); timer.cc[3].read().bits() |