Skip to content

Commit

Permalink
pythongh-122860: Remove unused macro _Py_atomic_load_relaxed_int32 (p…
Browse files Browse the repository at this point in the history
  • Loading branch information
colesbury authored Aug 11, 2024
1 parent bc9d92c commit 1069190
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
7 changes: 0 additions & 7 deletions Python/ceval_gil.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@
(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)
Expand Down
7 changes: 0 additions & 7 deletions Python/ceval_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1069190

Please sign in to comment.