diff options
author | Tomasz Pytel <tompytel@gmail.com> | 2025-04-14 12:31:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-14 18:31:19 +0200 |
commit | 4c12a2db15639fe1b28f1f0f807a18fb7b71d851 (patch) | |
tree | 2884d96cb9919909e25230038dca41c34308f3af /Include | |
parent | 45c447bf91ffabe4c0ba6d18f37d4e58925d5c91 (diff) | |
download | cpython-4c12a2db15639fe1b28f1f0f807a18fb7b71d851.tar.gz cpython-4c12a2db15639fe1b28f1f0f807a18fb7b71d851.zip |
gh-131757: allow lru_cache functions to execute concurrently (#131758)
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_pyatomic_ft_wrappers.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/internal/pycore_pyatomic_ft_wrappers.h b/Include/internal/pycore_pyatomic_ft_wrappers.h index d755d03a5fa..3e41e2fd156 100644 --- a/Include/internal/pycore_pyatomic_ft_wrappers.h +++ b/Include/internal/pycore_pyatomic_ft_wrappers.h @@ -109,6 +109,8 @@ extern "C" { _Py_atomic_store_ullong_relaxed(&value, new_value) #define FT_ATOMIC_LOAD_ULLONG_RELAXED(value) \ _Py_atomic_load_ullong_relaxed(&value) +#define FT_ATOMIC_ADD_SSIZE(value, new_value) \ + (void)_Py_atomic_add_ssize(&value, new_value) #else #define FT_ATOMIC_LOAD_PTR(value) value @@ -156,6 +158,7 @@ extern "C" { #define FT_ATOMIC_STORE_LLONG_RELAXED(value, new_value) value = new_value #define FT_ATOMIC_LOAD_ULLONG_RELAXED(value) value #define FT_ATOMIC_STORE_ULLONG_RELAXED(value, new_value) value = new_value +#define FT_ATOMIC_ADD_SSIZE(value, new_value) (void)(value += new_value) #endif |