- currentvalue=atomic_load_explicit(&rw->lock, memory_order_relaxed);
- } while(currentvalue!=RW_LOCK_BIAS);
- currentvalue=atomic_fetch_sub_explicit(&rw->lock, RW_LOCK_BIAS, memory_order_acquire);
+ priorvalue = atomic_load_explicit(&rw->lock, memory_order_relaxed);
+ } while (priorvalue != RW_LOCK_BIAS);
+ priorvalue = atomic_fetch_sub_explicit(&rw->lock, RW_LOCK_BIAS, memory_order_acquire);