File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -235,11 +235,11 @@ mod inner {
235
235
static INITIALIZED : AtomicBool = AtomicBool :: new ( false ) ;
236
236
static INFO_BITS : AtomicU64 = AtomicU64 :: new ( 0 ) ;
237
237
238
- // If a previous thread has filled in this global INITIALIZED , use that.
238
+ // If a previous thread has initialized `INFO_BITS` , use that.
239
239
if INITIALIZED . load ( Ordering :: Acquire ) {
240
- // The Acquire/Release pair used for INITIALIZED ensures that this
241
- // load can see the corresponding `INFO_BITS` store, despite them
242
- // both being Relaxed .
240
+ // Note: `Relaxed` is correct here and below -- the `Acquire` /
241
+ // `Release` pair used for `INITIALIZED` ensures this load can see
242
+ // the corresponding store below .
243
243
return info_from_bits ( INFO_BITS . load ( Ordering :: Relaxed ) ) ;
244
244
}
245
245
@@ -253,7 +253,7 @@ mod inner {
253
253
mach_timebase_info ( & mut info) ;
254
254
}
255
255
256
- // Note: This is racy, but the race is against other threads trying to
256
+ // This is racy, but the race should be against other threads trying to
257
257
// write the same value.
258
258
INFO_BITS . store ( info_to_bits ( info) , Ordering :: Relaxed ) ;
259
259
You can’t perform that action at this time.
0 commit comments