From 317bab0bf61e4cbab37c81baf185d8b57ca62a6b Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 2 Jun 2020 18:44:54 +0200 Subject: PyOS_AfterFork_Child() pass tstate to _PyEval_ReInitThreads() (GH-20598) --- Python/ceval.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Python/ceval.c') diff --git a/Python/ceval.c b/Python/ceval.c index 5edcfe3540..9ab8329d6d 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -436,10 +436,9 @@ PyEval_ReleaseThread(PyThreadState *tstate) which are not running in the child process, and clear internal locks which might be held by those threads. */ PyStatus -_PyEval_ReInitThreads(_PyRuntimeState *runtime) +_PyEval_ReInitThreads(PyThreadState *tstate) { - PyThreadState *tstate = _PyRuntimeState_GetThreadState(runtime); - _Py_EnsureTstateNotNULL(tstate); + _PyRuntimeState *runtime = tstate->interp->runtime; #ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS struct _gil_runtime_state *gil = &tstate->interp->ceval.gil; -- cgit v1.2.1