jzarnett / ece459

ECE 459: Programming for Performance
446 stars 137 forks source link

Correct lock compare and swap expected return value #61

Closed NathanielRN closed 3 years ago

NathanielRN commented 3 years ago

From the follow up to this Piazza question

Fixes the example using spinlock compare_and_swap to continue trying to lock if the old_value of the lock is true. Old value of true means locking was unsuccessful.

Fixes #59