Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

L12 spinlock code wrong comparison #59

Closed
jzarnett opened this issue Feb 4, 2021 · 0 comments · Fixed by #61
Closed

L12 spinlock code wrong comparison #59

jzarnett opened this issue Feb 4, 2021 · 0 comments · Fixed by #61
Assignees

Comments

@jzarnett
Copy link
Owner

jzarnett commented Feb 4, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant