summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-06-02 16:44:54 (GMT)
committerGitHub <noreply@github.com>2020-06-02 16:44:54 (GMT)
commit317bab0bf61e4cbab37c81baf185d8b57ca62a6b (patch)
treefb72064426f3bf0c9a91360397bcd0bf651590e0 /Python/ceval.c
parent45b34a04a577aa49fa4825421758c3e8eaa1625d (diff)
downloadcpython-317bab0bf61e4cbab37c81baf185d8b57ca62a6b.zip
cpython-317bab0bf61e4cbab37c81baf185d8b57ca62a6b.tar.gz
cpython-317bab0bf61e4cbab37c81baf185d8b57ca62a6b.tar.bz2
PyOS_AfterFork_Child() pass tstate to _PyEval_ReInitThreads() (GH-20598)
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c5
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;