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

Support __atomic_compare_exchange #689

Merged
merged 11 commits into from
Oct 25, 2024
Merged

Support __atomic_compare_exchange #689

merged 11 commits into from
Oct 25, 2024

Conversation

maul-esel
Copy link
Contributor

This PR adds support for the builtin atomic functions __atomic_compare_exchange_n and __atomic_compare_exchange.

Copy link
Contributor

@schuessf schuessf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I think it looks good, I have just some minor comments.

Follow description in C standard rather than unclear cppref / GNU
descriptions (the C standard is still pretty vague though).
Introduce some auxiliary methods to make the code easier to read.
Optimize code when "weak" argument is a literal and adapt a program
to test this.
@maul-esel maul-esel requested a review from schuessf October 25, 2024 11:26
Copy link
Contributor

@schuessf schuessf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I just assume your implementation follows the vague standard 😉

@maul-esel maul-esel merged commit 7fff204 into dev Oct 25, 2024
2 checks passed
@maul-esel maul-esel deleted the wip/dk/atomic-cas branch October 25, 2024 19:42
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 this pull request may close these issues.

2 participants