summaryrefslogtreecommitdiffstats
path: root/Include/internal/pycore_ceval.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/internal/pycore_ceval.h')
-rw-r--r--Include/internal/pycore_ceval.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/Include/internal/pycore_ceval.h b/Include/internal/pycore_ceval.h
index 5a80f6f..b9f2d7d 100644
--- a/Include/internal/pycore_ceval.h
+++ b/Include/internal/pycore_ceval.h
@@ -11,12 +11,8 @@ 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*);
-
struct _pending_calls {
+ unsigned long main_thread;
PyThread_type_lock lock;
/* Request for running pending calls. */
_Py_atomic_int calls_to_do;
@@ -26,7 +22,6 @@ struct _pending_calls {
int async_exc;
#define NPENDINGCALLS 32
struct {
- unsigned long thread_id;
int (*func)(void *);
void *arg;
} calls[NPENDINGCALLS];
@@ -34,13 +29,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 {
@@ -51,8 +39,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;