Skip to content

Commit f3a9c74

Browse files
committed
Using FT_MUTEX_LOCK macro
1 parent e178e42 commit f3a9c74

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

Include/internal/pycore_interp_structs.h

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,10 @@ extern "C" {
3030
#endif
3131

3232
// Executor list lock macros for thread-safe access to executor linked lists
33-
#ifdef Py_GIL_DISABLED
34-
# define EXECUTOR_LIST_LOCK(interp) \
35-
PyMutex_Lock(&(interp)->executor_list_lock)
36-
# define EXECUTOR_LIST_UNLOCK(interp) \
37-
PyMutex_Unlock(&(interp)->executor_list_lock)
38-
#else
39-
# define EXECUTOR_LIST_LOCK(interp) ((void)0)
40-
# define EXECUTOR_LIST_UNLOCK(interp) ((void)0)
41-
#endif
33+
#define EXECUTOR_LIST_LOCK(interp) \
34+
FT_MUTEX_LOCK(&(interp)->executor_list_lock)
35+
#define EXECUTOR_LIST_UNLOCK(interp) \
36+
FT_MUTEX_UNLOCK(&(interp)->executor_list_lock)
4237

4338
typedef int (*_Py_pending_call_func)(void *);
4439

0 commit comments

Comments
 (0)