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
Expand pyatomic coverage #108337
Labels
3.13
new features, bugs and security fixes
topic-C-API
type-feature
A feature request or enhancement
Comments
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Aug 22, 2023
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.
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Aug 22, 2023
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.
vstinner
pushed a commit
to vstinner/cpython
that referenced
this issue
Aug 30, 2023
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.
vstinner
pushed a commit
to vstinner/cpython
that referenced
this issue
Aug 30, 2023
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.
vstinner
pushed a commit
to vstinner/cpython
that referenced
this issue
Aug 31, 2023
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.
vstinner
pushed a commit
to vstinner/cpython
that referenced
this issue
Aug 31, 2023
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.
vstinner
added a commit
that referenced
this issue
Aug 31, 2023
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. Co-authored-by: Sam Gross <colesbury@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.13
new features, bugs and security fixes
topic-C-API
type-feature
A feature request or enhancement
Feature or enhancement
Implementing PEP 703 requires use of atomic operations on more data types than provided by
pycore_atomic.h. Additionally,pycore_atomic.his only usable fromPy_BUILD_COREmodules; it can't be used in public headers. PEP 703 will require atomic operations inobject.hfor Py_INCREF/DECREF, for example.I propose adding a new header to wrap platform/C11 provided atomic operations:
intinstead of_Py_atomic_int). This allows use of atomic operations on existing data types where we don't want to change the types of contained fields (i.e, the fields ofPyTypeObject.) and avoids some issues regarding mixing C and C++.-std=gnu11or-std=c11to the compiler, which avoids breaking third-party extensions._Py_atomic_load_intand_Py_atomic_load_int_relaxed) but keeps the implementation of each function simpler, particularly for MSVC. This reduces boiler-plate code when stepping through debug builds.Linked PRs
The text was updated successfully, but these errors were encountered: