We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e45778b commit bafabd7Copy full SHA for bafabd7
Python/specialize.c
@@ -693,8 +693,8 @@ static inline int
693
set_cache_verison(uint16_t *old_version, uint32_t new_version)
694
{
695
#ifdef Py_GIL_DISABLED
696
- uint32_t old_version_val = read_u32(old_version);
697
- if (!_Py_atomic_compare_exchange_uint32((uint32_t *)old_version, &old_version_val, new_version)) {
+ uint16_t old_version_val = _Py_atomic_load_uint16_relaxed(old_version);
+ if (!_Py_atomic_compare_exchange_uint16(old_version, &old_version_val, new_version)) {
698
return 0;
699
}
700
return 1;
0 commit comments