Debian Codegraph @

Include/internal/pycore_ceval_state.h

raw
1 #ifndef Py_INTERNAL_CEVAL_STATE_H
2 #define Py_INTERNAL_CEVAL_STATE_H
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6
7 #ifndef Py_BUILD_CORE
8 # error "this header requires Py_BUILD_CORE define"
9 #endif
10
11 #include "pycore_gil.h" // struct _gil_runtime_state
12
13
14 #define MAXPENDINGCALLS PENDINGCALLSARRAYSIZE
15 /* For interpreter-level pending calls, we want to avoid spending too
16 much time on pending calls in any one thread, so we apply a limit. */
17 #if MAXPENDINGCALLS > 100
18 # define MAXPENDINGCALLSLOOP 100
19 #else
20 # define MAXPENDINGCALLSLOOP MAXPENDINGCALLS
21 #endif
22
23 /* We keep the number small to preserve as much compatibility
24 as possible with earlier versions. */
25 #define MAXPENDINGCALLS_MAIN 32
26 /* For the main thread, we want to make sure all pending calls are
27 run at once, for the sake of prompt signal handling. This is
28 unlikely to cause any problems since there should be very few
29 pending calls for the main thread. */
30 #define MAXPENDINGCALLSLOOP_MAIN 0
31
32
33 #ifdef PY_HAVE_PERF_TRAMPOLINE
34 # define _PyEval_RUNTIME_PERF_INIT \
35 { \
36 .status = PERF_STATUS_NO_INIT, \
37 .extra_code_index = -1, \
38 .persist_after_fork = 0, \
39 }
40 #else
41 # define _PyEval_RUNTIME_PERF_INIT {0}
42 #endif
43
44
45 #ifdef __cplusplus
46 }
47 #endif
48 #endif /* !Py_INTERNAL_CEVAL_STATE_H */