gh-108337: Add pyatomic.h header#108701
Conversation
|
This PR is a copy of PR #108338 with my changes:
|
|
cc @colesbury |
|
Out of curiosity, https://clang.llvm.org/docs/LanguageExtensions.html#langext-c11-atomic |
Are there advantages on using these clang functions, instead of using the pyatomic_gcc.h on clang? |
|
@vstinner, no, both sets of intrinsics work fine on Clang |
|
PR rebased on the main branch to fix the merge conflict. |
This adds a new header that provides atomic operations on common data types. The intention is that this will be exposed through Python.h, although that is not the case yet. The only immediate use is in the test file.
|
The final commit look like this: Locally, Sam Gross was the author. I don't understand how GitHub merge works. It seems to change the author, sorry about that :-( I'm not used to "copy" a PR to propose some changes. |
|
Thanks @colesbury, that's a nice addition! It looks better than |
This adds a new header that provides atomic operations on common data types. The intention is that this will be exposed through Python.h, although that is not the case yet. The only immediate use is in the test file.
📚 Documentation preview 📚: https://cpython-previews--108701.org.readthedocs.build/