File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -235,11 +235,11 @@ mod inner {
235235 static INITIALIZED : AtomicBool = AtomicBool :: new ( false ) ;
236236 static INFO_BITS : AtomicU64 = AtomicU64 :: new ( 0 ) ;
237237
238- // If a previous thread has filled in this global INITIALIZED , use that.
238+ // If a previous thread has initialized `INFO_BITS` , use that.
239239 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 .
243243 return info_from_bits ( INFO_BITS . load ( Ordering :: Relaxed ) ) ;
244244 }
245245
@@ -253,7 +253,7 @@ mod inner {
253253 mach_timebase_info ( & mut info) ;
254254 }
255255
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
257257 // write the same value.
258258 INFO_BITS . store ( info_to_bits ( info) , Ordering :: Relaxed ) ;
259259
You can’t perform that action at this time.
0 commit comments