gh-108337: Add pyatomic.h header (#108701)

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>
This commit is contained in:
Victor Stinner 2023-08-31 23:41:18 +02:00 • committed by GitHub
parent c6d56135e1
commit 2bd960b579
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 3049 additions and 4 deletions

View file

@ -1,5 +1,5 @@
#ifndef Py_ATOMIC_H
#define Py_ATOMIC_H
#ifndef Py_INTERNAL_ATOMIC_H
#define Py_INTERNAL_ATOMIC_H
#ifdef __cplusplus
extern "C" {
#endif
@ -554,4 +554,4 @@ typedef struct _Py_atomic_int {
#ifdef __cplusplus
}
#endif
#endif /* Py_ATOMIC_H */
#endif /* Py_INTERNAL_ATOMIC_H */