File indexing completed on 2025-11-19 09:50:51
0001 #ifndef Py_INTERNAL_TSTATE_H
0002 #define Py_INTERNAL_TSTATE_H
0003 #ifdef __cplusplus
0004 extern "C" {
0005 #endif
0006
0007 #ifndef Py_BUILD_CORE
0008 # error "this header requires Py_BUILD_CORE define"
0009 #endif
0010
0011 #include "pycore_brc.h" // struct _brc_thread_state
0012 #include "pycore_freelist.h" // struct _Py_freelist_state
0013 #include "pycore_mimalloc.h" // struct _mimalloc_thread_state
0014 #include "pycore_qsbr.h" // struct qsbr
0015
0016
0017
0018
0019
0020 typedef struct _PyThreadStateImpl {
0021
0022 PyThreadState base;
0023
0024 PyObject *asyncio_running_loop;
0025
0026 struct _qsbr_thread_state *qsbr;
0027 struct llist_node mem_free_queue;
0028
0029 #ifdef Py_GIL_DISABLED
0030 struct _gc_thread_state gc;
0031 struct _mimalloc_thread_state mimalloc;
0032 struct _Py_object_freelists freelists;
0033 struct _brc_thread_state brc;
0034 #endif
0035
0036 #if defined(Py_REF_DEBUG) && defined(Py_GIL_DISABLED)
0037 Py_ssize_t reftotal;
0038 #endif
0039
0040 } _PyThreadStateImpl;
0041
0042
0043 #ifdef __cplusplus
0044 }
0045 #endif
0046 #endif