]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] fix memory order of `_Py_atomic_store_uint_release` (GH-141562) (GH-141663)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 17 Nov 2025 14:38:00 +0000 (15:38 +0100)
committerGitHub <noreply@github.com>
Mon, 17 Nov 2025 14:38:00 +0000 (14:38 +0000)
(cherry picked from commit 7800b78067162fc9d7cb6926f703fe14dee1702a)

Co-authored-by: SubbaraoGarlapati <53627478+SubbaraoGarlapati@users.noreply.github.com>
Include/cpython/pyatomic_std.h

index 69a8b9e615ea5ffc6285da638eb152c9a601807a..7176f667a4082cff50aa6226f1a099b62b48173f 100644 (file)
@@ -948,14 +948,6 @@ _Py_atomic_store_ushort_relaxed(unsigned short *obj, unsigned short value)
                           memory_order_relaxed);
 }
 
-static inline void
-_Py_atomic_store_uint_release(unsigned int *obj, unsigned int value)
-{
-    _Py_USING_STD;
-    atomic_store_explicit((_Atomic(unsigned int)*)obj, value,
-                          memory_order_relaxed);
-}
-
 static inline void
 _Py_atomic_store_long_relaxed(long *obj, long value)
 {
@@ -1031,6 +1023,14 @@ _Py_atomic_store_int_release(int *obj, int value)
                           memory_order_release);
 }
 
+static inline void
+_Py_atomic_store_uint_release(unsigned int *obj, unsigned int value)
+{
+    _Py_USING_STD;
+    atomic_store_explicit((_Atomic(unsigned int)*)obj, value,
+                          memory_order_release);
+}
+
 static inline void
 _Py_atomic_store_ssize_release(Py_ssize_t *obj, Py_ssize_t value)
 {