summaryrefslogtreecommitdiffstats
path: root/Python/ceval_gil.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-03-04 13:21:28 (GMT)
committerGitHub <noreply@github.com>2019-03-04 13:21:28 (GMT)
commit4d61e6e3b802399be62a521d6fa785698cb670b5 (patch)
tree9eb5258b1479331b29b9ce00e6b55c1dc01f9d06 /Python/ceval_gil.h
parentf4b0a1c0da80318e0a4f4c70d2722f01ce3512dd (diff)
downloadcpython-4d61e6e3b802399be62a521d6fa785698cb670b5.zip
cpython-4d61e6e3b802399be62a521d6fa785698cb670b5.tar.gz
cpython-4d61e6e3b802399be62a521d6fa785698cb670b5.tar.bz2
Revert: bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (GH-11617) (GH-12159)
* Revert "bpo-36097: Use only public C-API in the_xxsubinterpreters module (adding as necessary). (#12003)" This reverts commit bcfa450f210074e16feb761ae5b3e966a2532fcf. * Revert "bpo-33608: Simplify ceval's DISPATCH by hoisting eval_breaker ahead of time. (gh-12062)" This reverts commit bda918bf65a88560ec453aaba0758a9c0d49b449. * Revert "bpo-33608: Use _Py_AddPendingCall() in _PyCrossInterpreterData_Release(). (gh-12024)" This reverts commit b05b711a2cef6c6c381e01069dedac372e0b9fb2. * Revert "bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (GH-11617)" This reverts commit ef4ac967e2f3a9a18330cc6abe14adb4bc3d0465.
Diffstat (limited to 'Python/ceval_gil.h')
-rw-r--r--Python/ceval_gil.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/ceval_gil.h b/Python/ceval_gil.h
index d9ad361..f2d5fdb 100644
--- a/Python/ceval_gil.h
+++ b/Python/ceval_gil.h
@@ -176,7 +176,7 @@ static void drop_gil(PyThreadState *tstate)
&_PyRuntime.ceval.gil.last_holder)
) == tstate)
{
- RESET_GIL_DROP_REQUEST(tstate->interp);
+ RESET_GIL_DROP_REQUEST();
/* NOTE: if COND_WAIT does not atomically start waiting when
releasing the mutex, another thread can run through, take
the GIL and drop it again, and reset the condition
@@ -213,7 +213,7 @@ static void take_gil(PyThreadState *tstate)
if (timed_out &&
_Py_atomic_load_relaxed(&_PyRuntime.ceval.gil.locked) &&
_PyRuntime.ceval.gil.switch_number == saved_switchnum) {
- SET_GIL_DROP_REQUEST(tstate->interp);
+ SET_GIL_DROP_REQUEST();
}
}
_ready:
@@ -239,10 +239,10 @@ _ready:
MUTEX_UNLOCK(_PyRuntime.ceval.gil.switch_mutex);
#endif
if (_Py_atomic_load_relaxed(&_PyRuntime.ceval.gil_drop_request)) {
- RESET_GIL_DROP_REQUEST(tstate->interp);
+ RESET_GIL_DROP_REQUEST();
}
if (tstate->async_exc != NULL) {
- _PyEval_SignalAsyncExc(tstate->interp);
+ _PyEval_SignalAsyncExc();
}
MUTEX_UNLOCK(_PyRuntime.ceval.gil.mutex);