diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2019-04-12 16:20:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-12 16:20:10 (GMT) |
commit | b75b1a3504a0cea6fac6ecba44c10b2629577025 (patch) | |
tree | 14d6fd9909a1f4ec1ca70ba012569bd495d35d5a /Include/internal | |
parent | f938d8be4ce3e1ccca7c31cf673265634307147f (diff) | |
download | cpython-b75b1a3504a0cea6fac6ecba44c10b2629577025.zip cpython-b75b1a3504a0cea6fac6ecba44c10b2629577025.tar.gz cpython-b75b1a3504a0cea6fac6ecba44c10b2629577025.tar.bz2 |
bpo-33608: Revert "Factor out a private, per-interpreter _Py_AddPendingCall()." (gh-12806)
This reverts commit f13c5c8b9401a9dc19e95d8b420ee100ac022208 (gh-12360).
Diffstat (limited to 'Include/internal')
-rw-r--r-- | Include/internal/pycore_ceval.h | 18 | ||||
-rw-r--r-- | Include/internal/pycore_pystate.h | 3 |
2 files changed, 5 insertions, 16 deletions
diff --git a/Include/internal/pycore_ceval.h b/Include/internal/pycore_ceval.h index 1bdcdf5..2ead96c 100644 --- a/Include/internal/pycore_ceval.h +++ b/Include/internal/pycore_ceval.h @@ -11,11 +11,7 @@ extern "C" { #include "pycore_atomic.h" #include "pythread.h" -struct _is; // See PyInterpreterState in cpython/pystate.h. - -PyAPI_FUNC(int) _Py_AddPendingCall(struct _is*, unsigned long, int (*)(void *), void *); -PyAPI_FUNC(int) _Py_MakePendingCalls(struct _is*); -PyAPI_FUNC(void) _Py_FinishPendingCalls(struct _is*); +PyAPI_FUNC(void) _Py_FinishPendingCalls(void); struct _pending_calls { int finishing; @@ -28,7 +24,6 @@ struct _pending_calls { int async_exc; #define NPENDINGCALLS 32 struct { - unsigned long thread_id; int (*func)(void *); void *arg; } calls[NPENDINGCALLS]; @@ -36,13 +31,6 @@ struct _pending_calls { int last; }; -struct _ceval_interpreter_state { - /* This single variable consolidates all requests to break out of - the fast path in the eval loop. */ - _Py_atomic_int eval_breaker; - struct _pending_calls pending; -}; - #include "pycore_gil.h" struct _ceval_runtime_state { @@ -53,8 +41,12 @@ struct _ceval_runtime_state { c_tracefunc. This speeds up the if statement in PyEval_EvalFrameEx() after fast_next_opcode. */ int tracing_possible; + /* This single variable consolidates all requests to break out of + the fast path in the eval loop. */ + _Py_atomic_int eval_breaker; /* Request for dropping the GIL */ _Py_atomic_int gil_drop_request; + struct _pending_calls pending; /* Request for checking signals. */ _Py_atomic_int signals_pending; struct _gil_runtime_state gil; diff --git a/Include/internal/pycore_pystate.h b/Include/internal/pycore_pystate.h index 3ae2e0c..df3730f 100644 --- a/Include/internal/pycore_pystate.h +++ b/Include/internal/pycore_pystate.h @@ -12,7 +12,6 @@ extern "C" { #include "pystate.h" #include "pythread.h" -#include "pycore_atomic.h" #include "pycore_ceval.h" #include "pycore_pathconfig.h" #include "pycore_pymem.h" @@ -84,8 +83,6 @@ struct _is { PyObject *pyexitmodule; uint64_t tstate_next_unique_id; - - struct _ceval_interpreter_state ceval; }; PyAPI_FUNC(struct _is*) _PyInterpreterState_LookUpID(PY_INT64_T); |