Skip to content

Commit 7800b78

Browse files
fix memory order of _Py_atomic_store_uint_release (python#141562)
1 parent 8be3b2f commit 7800b78

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Include/cpython/pyatomic_std.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -948,14 +948,6 @@ _Py_atomic_store_ushort_relaxed(unsigned short *obj, unsigned short value)
948948
memory_order_relaxed);
949949
}
950950

951-
static inline void
952-
_Py_atomic_store_uint_release(unsigned int *obj, unsigned int value)
953-
{
954-
_Py_USING_STD;
955-
atomic_store_explicit((_Atomic(unsigned int)*)obj, value,
956-
memory_order_relaxed);
957-
}
958-
959951
static inline void
960952
_Py_atomic_store_long_relaxed(long *obj, long value)
961953
{
@@ -1031,6 +1023,14 @@ _Py_atomic_store_int_release(int *obj, int value)
10311023
memory_order_release);
10321024
}
10331025

1026+
static inline void
1027+
_Py_atomic_store_uint_release(unsigned int *obj, unsigned int value)
1028+
{
1029+
_Py_USING_STD;
1030+
atomic_store_explicit((_Atomic(unsigned int)*)obj, value,
1031+
memory_order_release);
1032+
}
1033+
10341034
static inline void
10351035
_Py_atomic_store_ssize_release(Py_ssize_t *obj, Py_ssize_t value)
10361036
{

0 commit comments

Comments
 (0)