jzarnett / ece459

ECE 459: Programming for Performance
419 stars 133 forks source link

L12 spinlock code wrong comparison #59

Closed jzarnett closed 3 years ago

jzarnett commented 3 years ago

Should be my_lock.compare_and_swap(false, true, Ordering::SeqCst) == true instead of my_lock.compare_and_swap(false, true, Ordering::SeqCst) == false

Thanks to the anonymous student who reported it on Piazza.