File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -558,7 +558,7 @@ fn test_downgrade_atomic() {
558
558
// modify the protected value.
559
559
560
560
// `W` is the number of evil writer threads.
561
- const W : usize = if cfg ! ( target_pointer_width = "64" ) { 100 } else { 20 } ;
561
+ const W : usize = 20 ;
562
562
let rwlock = Arc :: new ( RwLock :: new ( 0 ) ) ;
563
563
564
564
// Spawns many evil writer threads that will try and write to the locked value before the
Original file line number Diff line number Diff line change @@ -395,9 +395,9 @@ impl RwLock {
395
395
node. next . 0 = AtomicPtr :: new ( state. mask ( NODE_MASK ) . cast ( ) ) ;
396
396
node. prev = AtomicLink :: new ( None ) ;
397
397
398
- // Set the `QUEUED` bit and maintain the `LOCKED` bit.
398
+ // Set the `QUEUED` bit and preserve the `LOCKED` and `DOWNGRADED ` bit.
399
399
let mut next = ptr:: from_ref ( & node)
400
- . map_addr ( |addr| addr | QUEUED | ( state. addr ( ) & LOCKED ) )
400
+ . map_addr ( |addr| addr | QUEUED | ( state. addr ( ) & ( DOWNGRADED | LOCKED ) ) )
401
401
as State ;
402
402
403
403
let mut is_queue_locked = false ;
You can’t perform that action at this time.
0 commit comments