diff options
author | Victor Stinner <vstinner@python.org> | 2020-06-02 16:44:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-02 16:44:54 (GMT) |
commit | 317bab0bf61e4cbab37c81baf185d8b57ca62a6b (patch) | |
tree | fb72064426f3bf0c9a91360397bcd0bf651590e0 /Python | |
parent | 45b34a04a577aa49fa4825421758c3e8eaa1625d (diff) | |
download | cpython-317bab0bf61e4cbab37c81baf185d8b57ca62a6b.zip cpython-317bab0bf61e4cbab37c81baf185d8b57ca62a6b.tar.gz cpython-317bab0bf61e4cbab37c81baf185d8b57ca62a6b.tar.bz2 |
PyOS_AfterFork_Child() pass tstate to _PyEval_ReInitThreads() (GH-20598)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 5edcfe3..9ab8329 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; |