diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2019-02-24 23:40:47 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-24 23:40:47 (GMT) |
commit | ef4ac967e2f3a9a18330cc6abe14adb4bc3d0465 (patch) | |
tree | 9486fb50d2f39468a7c00de7fb5c05fdd67372e8 /Python/ceval_gil.h | |
parent | 463572c8beb59fd9d6850440af48a5c5f4c0c0c9 (diff) | |
download | cpython-ef4ac967e2f3a9a18330cc6abe14adb4bc3d0465.zip cpython-ef4ac967e2f3a9a18330cc6abe14adb4bc3d0465.tar.gz cpython-ef4ac967e2f3a9a18330cc6abe14adb4bc3d0465.tar.bz2 |
bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). (GH-11617)
This involves moving the global "pending calls" state to PyInterpreterState.
https://bugs.python.org/issue33608
Diffstat (limited to 'Python/ceval_gil.h')
-rw-r--r-- | Python/ceval_gil.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/ceval_gil.h b/Python/ceval_gil.h index f2d5fdb..d9ad361 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(); + RESET_GIL_DROP_REQUEST(tstate->interp); /* 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(); + SET_GIL_DROP_REQUEST(tstate->interp); } } _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(); + RESET_GIL_DROP_REQUEST(tstate->interp); } if (tstate->async_exc != NULL) { - _PyEval_SignalAsyncExc(); + _PyEval_SignalAsyncExc(tstate->interp); } MUTEX_UNLOCK(_PyRuntime.ceval.gil.mutex); |