Fix race condition in calculate_now (#860)

* Fix race condition in calculate_now

* Add changelog

* Update changelog

* Refine comment

* More comment fixes
This commit is contained in:
Finomnis 2023-12-06 19:36:09 +01:00 committed by GitHub
parent f377471e44
commit bbed945285
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 27 additions and 15 deletions

View file

@ -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()
))
}