]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-122860: Remove unused macro `_Py_atomic_load_relaxed_int32` (#122861)
authorSam Gross <colesbury@gmail.com>
Sun, 11 Aug 2024 17:15:02 +0000 (13:15 -0400)
committerGitHub <noreply@github.com>
Sun, 11 Aug 2024 17:15:02 +0000 (22:45 +0530)
Python/ceval_gil.c
Python/ceval_macros.h

index 0b45caba0d49ff8bd8efebd9ee88535f8f54a477..6f4476d055b5ecacadb55e5297fc4105dd6fe75f 100644 (file)
      (Note: this mechanism is enabled with FORCE_SWITCHING above)
 */
 
-// GH-89279: Force inlining by using a macro.
-#if defined(_MSC_VER) && SIZEOF_INT == 4
-#define _Py_atomic_load_relaxed_int32(ATOMIC_VAL) (assert(sizeof((ATOMIC_VAL)->_value) == 4), *((volatile int*)&((ATOMIC_VAL)->_value)))
-#else
-#define _Py_atomic_load_relaxed_int32(ATOMIC_VAL) _Py_atomic_load_relaxed(ATOMIC_VAL)
-#endif
-
 // Atomically copy the bits indicated by mask between two values.
 static inline void
 copy_eval_breaker_bits(uintptr_t *from, uintptr_t *to, uintptr_t mask)
index 2881ed2153a7c1ca651a29cde4fe2cc7884202a8..8b25a5f0ea4ce3d81d0514219b2ab6bc0f6260ed 100644 (file)
@@ -375,13 +375,6 @@ do { \
 } while (0);
 
 
-// GH-89279: Force inlining by using a macro.
-#if defined(_MSC_VER) && SIZEOF_INT == 4
-#define _Py_atomic_load_relaxed_int32(ATOMIC_VAL) (assert(sizeof((ATOMIC_VAL)->_value) == 4), *((volatile int*)&((ATOMIC_VAL)->_value)))
-#else
-#define _Py_atomic_load_relaxed_int32(ATOMIC_VAL) _Py_atomic_load_relaxed(ATOMIC_VAL)
-#endif
-
 static inline int _Py_EnterRecursivePy(PyThreadState *tstate) {
     return (tstate->py_recursion_remaining-- <= 0) &&
         _Py_CheckRecursiveCallPy(tstate);