Skip to content

bpo-33608: Normalize atomic macros so that they all expect an atomic struct #12877

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

Merged
merged 1 commit into from
Apr 22, 2019

Conversation

zooba
Copy link
Member

@zooba zooba commented Apr 18, 2019

@ericsnowcurrently @paulmon This should be an alternative fix to #12665.

Basically, any macro/function starting with _Py_atomic now always requires a reference to a _Py_atomic struct, and never the extracted value.

https://bugs.python.org/issue33608

@paulmon
Copy link
Contributor

paulmon commented Apr 18, 2019

Looks good. It makes sense to me that the macro name implies the argument type.
I have also confirmed that this builds for ARM and runs as expected

@zooba
Copy link
Member Author

zooba commented Apr 18, 2019

I triggered a custom buildbot run to validate this across the fleet.

@zooba
Copy link
Member Author

zooba commented Apr 18, 2019

The custom buildbots seem happy enough, so I'll give Eric some time to review if he wants and then I'll merge.

Copy link
Member

@ericsnowcurrently ericsnowcurrently left a comment

Choose a reason for hiding this comment

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

The approach is good. It definitely reads better. :) I only had a chance to skim through the PR. If you'd like me to dig in and verify each line (which could be valuable given the sensitivity of this code) then I'll see about that tomorrow afternoon. Otherwise LGTM.

@zooba zooba merged commit 2644907 into python:master Apr 22, 2019
@zooba
Copy link
Member Author

zooba commented Apr 22, 2019

Mostly wanted an "OK" on the approach. The compiler is doing the most important checks

@zooba zooba deleted the bpo-33608 branch April 22, 2019 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants