mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
gh-116590: Fix unused current_thread_holds_gil
function warning (#116591)
This commit is contained in:
parent
ffd79bea0f
commit
817fe33a1d
1 changed files with 2 additions and 0 deletions
|
@ -417,6 +417,7 @@ PyEval_ThreadsInitialized(void)
|
|||
return _PyEval_ThreadsInitialized();
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
static inline int
|
||||
current_thread_holds_gil(struct _gil_runtime_state *gil, PyThreadState *tstate)
|
||||
{
|
||||
|
@ -425,6 +426,7 @@ current_thread_holds_gil(struct _gil_runtime_state *gil, PyThreadState *tstate)
|
|||
}
|
||||
return _Py_atomic_load_int_relaxed(&gil->locked);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
init_shared_gil(PyInterpreterState *interp, struct _gil_runtime_state *gil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue