X7ROOT File Manager
Current Path:
/opt/alt/python313/include/python3.13/internal
opt
/
alt
/
python313
/
include
/
python3.13
/
internal
/
ðŸ“
..
ðŸ“
mimalloc
📄
pycore_abstract.h
(1.87 KB)
📄
pycore_asdl.h
(2.96 KB)
📄
pycore_ast.h
(30.78 KB)
📄
pycore_ast_state.h
(6.62 KB)
📄
pycore_atexit.h
(1.4 KB)
📄
pycore_backoff.h
(3.81 KB)
📄
pycore_bitutils.h
(5.88 KB)
📄
pycore_blocks_output_buffer.h
(8.57 KB)
📄
pycore_brc.h
(2.05 KB)
📄
pycore_bytes_methods.h
(3.84 KB)
📄
pycore_bytesobject.h
(4.75 KB)
📄
pycore_call.h
(5.99 KB)
📄
pycore_capsule.h
(397 B)
📄
pycore_cell.h
(1.03 KB)
📄
pycore_ceval.h
(10.9 KB)
📄
pycore_ceval_state.h
(3.83 KB)
📄
pycore_code.h
(19.4 KB)
📄
pycore_codecs.h
(2.41 KB)
📄
pycore_compile.h
(3.66 KB)
📄
pycore_complexobject.h
(588 B)
📄
pycore_condvar.h
(2.64 KB)
📄
pycore_context.h
(1.15 KB)
📄
pycore_critical_section.h
(7.78 KB)
📄
pycore_crossinterp.h
(11.84 KB)
📄
pycore_descrobject.h
(543 B)
📄
pycore_dict.h
(11.98 KB)
📄
pycore_dict_state.h
(732 B)
📄
pycore_dtoa.h
(1.69 KB)
📄
pycore_emscripten_signal.h
(685 B)
📄
pycore_emscripten_trampoline.h
(3.11 KB)
📄
pycore_exceptions.h
(900 B)
📄
pycore_faulthandler.h
(2.19 KB)
📄
pycore_fileutils.h
(9.25 KB)
📄
pycore_fileutils_windows.h
(2.65 KB)
📄
pycore_floatobject.h
(1.46 KB)
📄
pycore_flowgraph.h
(1.45 KB)
📄
pycore_format.h
(480 B)
📄
pycore_frame.h
(10.62 KB)
📄
pycore_freelist.h
(4.7 KB)
📄
pycore_function.h
(1.5 KB)
📄
pycore_gc.h
(12.66 KB)
📄
pycore_genobject.h
(859 B)
📄
pycore_getopt.h
(490 B)
📄
pycore_gil.h
(2.14 KB)
📄
pycore_global_objects.h
(3.02 KB)
📄
pycore_global_objects_fini_generated.h
(115.04 KB)
📄
pycore_global_strings.h
(26.08 KB)
📄
pycore_hamt.h
(3.65 KB)
📄
pycore_hashtable.h
(4.26 KB)
📄
pycore_identifier.h
(515 B)
📄
pycore_import.h
(7.55 KB)
📄
pycore_importdl.h
(3.96 KB)
📄
pycore_initconfig.h
(6.23 KB)
📄
pycore_instruction_sequence.h
(2.11 KB)
📄
pycore_instruments.h
(2.28 KB)
📄
pycore_interp.h
(14.71 KB)
📄
pycore_intrinsics.h
(1.71 KB)
📄
pycore_jit.h
(527 B)
📄
pycore_list.h
(1.82 KB)
📄
pycore_llist.h
(2.36 KB)
📄
pycore_lock.h
(8.34 KB)
📄
pycore_long.h
(9.73 KB)
📄
pycore_memoryobject.h
(427 B)
📄
pycore_mimalloc.h
(1.6 KB)
📄
pycore_modsupport.h
(3.27 KB)
📄
pycore_moduleobject.h
(1.54 KB)
📄
pycore_namespace.h
(435 B)
📄
pycore_object.h
(26.64 KB)
📄
pycore_object_alloc.h
(2.13 KB)
📄
pycore_object_stack.h
(2.33 KB)
📄
pycore_object_state.h
(942 B)
📄
pycore_obmalloc.h
(26.78 KB)
📄
pycore_obmalloc_init.h
(1.89 KB)
📄
pycore_opcode_metadata.h
(82.74 KB)
📄
pycore_opcode_utils.h
(2.07 KB)
📄
pycore_optimizer.h
(8.11 KB)
📄
pycore_parking_lot.h
(3.27 KB)
📄
pycore_parser.h
(2.04 KB)
📄
pycore_pathconfig.h
(658 B)
📄
pycore_pyarena.h
(2.79 KB)
📄
pycore_pyatomic_ft_wrappers.h
(7.87 KB)
📄
pycore_pybuffer.h
(510 B)
📄
pycore_pyerrors.h
(4.84 KB)
📄
pycore_pyhash.h
(2.75 KB)
📄
pycore_pylifecycle.h
(4.36 KB)
📄
pycore_pymath.h
(8.4 KB)
📄
pycore_pymem.h
(4.37 KB)
📄
pycore_pymem_init.h
(3.44 KB)
📄
pycore_pystate.h
(9.73 KB)
📄
pycore_pystats.h
(420 B)
📄
pycore_pythonrun.h
(758 B)
📄
pycore_pythread.h
(5.3 KB)
📄
pycore_qsbr.h
(4.81 KB)
📄
pycore_range.h
(346 B)
📄
pycore_runtime.h
(12.84 KB)
📄
pycore_runtime_init.h
(12.74 KB)
📄
pycore_runtime_init_generated.h
(45.72 KB)
📄
pycore_semaphore.h
(1.69 KB)
📄
pycore_setobject.h
(951 B)
📄
pycore_signal.h
(2.86 KB)
📄
pycore_sliceobject.h
(369 B)
📄
pycore_stackref.h
(5.06 KB)
📄
pycore_strhex.h
(1013 B)
📄
pycore_structseq.h
(963 B)
📄
pycore_symtable.h
(8.47 KB)
📄
pycore_sysmodule.h
(1.15 KB)
📄
pycore_time.h
(11.52 KB)
📄
pycore_token.h
(2.93 KB)
📄
pycore_traceback.h
(3.54 KB)
📄
pycore_tracemalloc.h
(4.43 KB)
📄
pycore_tstate.h
(1.32 KB)
📄
pycore_tuple.h
(820 B)
📄
pycore_typeobject.h
(8.67 KB)
📄
pycore_typevarobject.h
(924 B)
📄
pycore_ucnhash.h
(958 B)
📄
pycore_unicodeobject.h
(12.15 KB)
📄
pycore_unicodeobject_generated.h
(129.04 KB)
📄
pycore_unionobject.h
(742 B)
📄
pycore_uop_ids.h
(10.03 KB)
📄
pycore_uop_metadata.h
(38.54 KB)
📄
pycore_warnings.h
(840 B)
📄
pycore_weakref.h
(3.25 KB)
Editing: pycore_runtime.h
#ifndef Py_INTERNAL_RUNTIME_H #define Py_INTERNAL_RUNTIME_H #ifdef __cplusplus extern "C" { #endif #ifndef Py_BUILD_CORE # error "this header requires Py_BUILD_CORE define" #endif #include "pycore_atexit.h" // struct _atexit_runtime_state #include "pycore_ceval_state.h" // struct _ceval_runtime_state #include "pycore_crossinterp.h" // struct _xidregistry #include "pycore_faulthandler.h" // struct _faulthandler_runtime_state #include "pycore_floatobject.h" // struct _Py_float_runtime_state #include "pycore_import.h" // struct _import_runtime_state #include "pycore_interp.h" // PyInterpreterState #include "pycore_object_state.h" // struct _py_object_runtime_state #include "pycore_parser.h" // struct _parser_runtime_state #include "pycore_pyhash.h" // struct pyhash_runtime_state #include "pycore_pymem.h" // struct _pymem_allocators #include "pycore_pythread.h" // struct _pythread_runtime_state #include "pycore_signal.h" // struct _signals_runtime_state #include "pycore_tracemalloc.h" // struct _tracemalloc_runtime_state #include "pycore_typeobject.h" // struct _types_runtime_state #include "pycore_unicodeobject.h" // struct _Py_unicode_runtime_state struct _getargs_runtime_state { struct _PyArg_Parser *static_parsers; }; /* GIL state */ struct _gilstate_runtime_state { /* bpo-26558: Flag to disable PyGILState_Check(). If set to non-zero, PyGILState_Check() always return 1. */ int check_enabled; /* The single PyInterpreterState used by this process' GILState implementation */ /* TODO: Given interp_main, it may be possible to kill this ref */ PyInterpreterState *autoInterpreterState; }; /* Runtime audit hook state */ #define _Py_Debug_Cookie "xdebugpy" #ifdef Py_GIL_DISABLED # define _Py_Debug_gilruntimestate_enabled offsetof(struct _gil_runtime_state, enabled) # define _Py_Debug_Free_Threaded 1 #else # define _Py_Debug_gilruntimestate_enabled 0 # define _Py_Debug_Free_Threaded 0 #endif typedef struct _Py_AuditHookEntry { struct _Py_AuditHookEntry *next; Py_AuditHookFunction hookCFunction; void *userData; } _Py_AuditHookEntry; typedef struct _Py_DebugOffsets { char cookie[8]; uint64_t version; uint64_t free_threaded; // Runtime state offset; struct _runtime_state { uint64_t size; uint64_t finalizing; uint64_t interpreters_head; } runtime_state; // Interpreter state offset; struct _interpreter_state { uint64_t size; uint64_t id; uint64_t next; uint64_t threads_head; uint64_t gc; uint64_t imports_modules; uint64_t sysdict; uint64_t builtins; uint64_t ceval_gil; uint64_t gil_runtime_state; uint64_t gil_runtime_state_enabled; uint64_t gil_runtime_state_locked; uint64_t gil_runtime_state_holder; } interpreter_state; // Thread state offset; struct _thread_state{ uint64_t size; uint64_t prev; uint64_t next; uint64_t interp; uint64_t current_frame; uint64_t thread_id; uint64_t native_thread_id; uint64_t datastack_chunk; uint64_t status; } thread_state; // InterpreterFrame offset; struct _interpreter_frame { uint64_t size; uint64_t previous; uint64_t executable; uint64_t instr_ptr; uint64_t localsplus; uint64_t owner; } interpreter_frame; // Code object offset; struct _code_object { uint64_t size; uint64_t filename; uint64_t name; uint64_t qualname; uint64_t linetable; uint64_t firstlineno; uint64_t argcount; uint64_t localsplusnames; uint64_t localspluskinds; uint64_t co_code_adaptive; } code_object; // PyObject offset; struct _pyobject { uint64_t size; uint64_t ob_type; } pyobject; // PyTypeObject object offset; struct _type_object { uint64_t size; uint64_t tp_name; uint64_t tp_repr; uint64_t tp_flags; } type_object; // PyTuple object offset; struct _tuple_object { uint64_t size; uint64_t ob_item; uint64_t ob_size; } tuple_object; // PyList object offset; struct _list_object { uint64_t size; uint64_t ob_item; uint64_t ob_size; } list_object; // PyDict object offset; struct _dict_object { uint64_t size; uint64_t ma_keys; uint64_t ma_values; } dict_object; // PyFloat object offset; struct _float_object { uint64_t size; uint64_t ob_fval; } float_object; // PyLong object offset; struct _long_object { uint64_t size; uint64_t lv_tag; uint64_t ob_digit; } long_object; // PyBytes object offset; struct _bytes_object { uint64_t size; uint64_t ob_size; uint64_t ob_sval; } bytes_object; // Unicode object offset; struct _unicode_object { uint64_t size; uint64_t state; uint64_t length; uint64_t asciiobject_size; } unicode_object; // GC runtime state offset; struct _gc { uint64_t size; uint64_t collecting; } gc; } _Py_DebugOffsets; /* Reference tracer state */ struct _reftracer_runtime_state { PyRefTracer tracer_func; void* tracer_data; }; /* Full Python runtime state */ /* _PyRuntimeState holds the global state for the CPython runtime. That data is exposed in the internal API as a static variable (_PyRuntime). */ typedef struct pyruntimestate { /* This field must be first to facilitate locating it by out of process * debuggers. Out of process debuggers will use the offsets contained in this * field to be able to locate other fields in several interpreter structures * in a way that doesn't require them to know the exact layout of those * structures. * * IMPORTANT: * This struct is **NOT** backwards compatible between minor version of the * interpreter and the members, order of members and size can change between * minor versions. This struct is only guaranteed to be stable between patch * versions for a given minor version of the interpreter. */ _Py_DebugOffsets debug_offsets; /* Has been initialized to a safe state. In order to be effective, this must be set to 0 during or right after allocation. */ int _initialized; /* Is running Py_PreInitialize()? */ int preinitializing; /* Is Python preinitialized? Set to 1 by Py_PreInitialize() */ int preinitialized; /* Is Python core initialized? Set to 1 by _Py_InitializeCore() */ int core_initialized; /* Is Python fully initialized? Set to 1 by Py_Initialize() */ int initialized; /* Set by Py_FinalizeEx(). Only reset to NULL if Py_Initialize() is called again. Use _PyRuntimeState_GetFinalizing() and _PyRuntimeState_SetFinalizing() to access it, don't access it directly. */ PyThreadState *_finalizing; /* The ID of the OS thread in which we are finalizing. */ unsigned long _finalizing_id; struct pyinterpreters { PyMutex mutex; /* The linked list of interpreters, newest first. */ PyInterpreterState *head; /* The runtime's initial interpreter, which has a special role in the operation of the runtime. It is also often the only interpreter. */ PyInterpreterState *main; /* next_id is an auto-numbered sequence of small integers. It gets initialized in _PyInterpreterState_Enable(), which is called in Py_Initialize(), and used in PyInterpreterState_New(). A negative interpreter ID indicates an error occurred. The main interpreter will always have an ID of 0. Overflow results in a RuntimeError. If that becomes a problem later then we can adjust, e.g. by using a Python int. */ int64_t next_id; } interpreters; /* Platform-specific identifier and PyThreadState, respectively, for the main thread in the main interpreter. */ unsigned long main_thread; PyThreadState *main_tstate; /* ---------- IMPORTANT --------------------------- The fields above this line are declared as early as possible to facilitate out-of-process observability tools. */ /* cross-interpreter data and utils */ struct _xi_runtime_state xi; struct _pymem_allocators allocators; struct _obmalloc_global_state obmalloc; struct pyhash_runtime_state pyhash_state; struct _pythread_runtime_state threads; struct _signals_runtime_state signals; /* Used for the thread state bound to the current thread. */ Py_tss_t autoTSSkey; /* Used instead of PyThreadState.trash when there is not current tstate. */ Py_tss_t trashTSSkey; PyWideStringList orig_argv; struct _parser_runtime_state parser; struct _atexit_runtime_state atexit; struct _import_runtime_state imports; struct _ceval_runtime_state ceval; struct _gilstate_runtime_state gilstate; struct _getargs_runtime_state getargs; struct _fileutils_state fileutils; struct _faulthandler_runtime_state faulthandler; struct _tracemalloc_runtime_state tracemalloc; struct _reftracer_runtime_state ref_tracer; // The rwmutex is used to prevent overlapping global and per-interpreter // stop-the-world events. Global stop-the-world events lock the mutex // exclusively (as a "writer"), while per-interpreter stop-the-world events // lock it non-exclusively (as "readers"). _PyRWMutex stoptheworld_mutex; struct _stoptheworld_state stoptheworld; PyPreConfig preconfig; // Audit values must be preserved when Py_Initialize()/Py_Finalize() // is called multiple times. Py_OpenCodeHookFunction open_code_hook; void *open_code_userdata; struct { PyMutex mutex; _Py_AuditHookEntry *head; } audit_hooks; struct _py_object_runtime_state object_state; struct _Py_float_runtime_state float_state; struct _Py_unicode_runtime_state unicode_state; struct _types_runtime_state types; /* All the objects that are shared by the runtime's interpreters. */ struct _Py_cached_objects cached_objects; struct _Py_static_objects static_objects; /* The following fields are here to avoid allocation during init. The data is exposed through _PyRuntimeState pointer fields. These fields should not be accessed directly outside of init. All other _PyRuntimeState pointer fields are populated when needed and default to NULL. For now there are some exceptions to that rule, which require allocation during init. These will be addressed on a case-by-case basis. Most notably, we don't pre-allocated the several mutex (PyThread_type_lock) fields, because on Windows we only ever get a pointer type. */ /* _PyRuntimeState.interpreters.main */ PyInterpreterState _main_interpreter; #if defined(__EMSCRIPTEN__) && defined(PY_CALL_TRAMPOLINE) // Used in "Python/emscripten_trampoline.c" to choose between type // reflection trampoline and EM_JS trampoline. bool wasm_type_reflection_available; #endif } _PyRuntimeState; /* other API */ // Export _PyRuntime for shared extensions which use it in static inline // functions for best performance, like _Py_IsMainThread() or _Py_ID(). // It's also made accessible for debuggers and profilers. PyAPI_DATA(_PyRuntimeState) _PyRuntime; extern PyStatus _PyRuntimeState_Init(_PyRuntimeState *runtime); extern void _PyRuntimeState_Fini(_PyRuntimeState *runtime); #ifdef HAVE_FORK extern PyStatus _PyRuntimeState_ReInitThreads(_PyRuntimeState *runtime); #endif /* Initialize _PyRuntimeState. Return NULL on success, or return an error message on failure. */ extern PyStatus _PyRuntime_Initialize(void); extern void _PyRuntime_Finalize(void); static inline PyThreadState* _PyRuntimeState_GetFinalizing(_PyRuntimeState *runtime) { return (PyThreadState*)_Py_atomic_load_ptr_relaxed(&runtime->_finalizing); } static inline unsigned long _PyRuntimeState_GetFinalizingID(_PyRuntimeState *runtime) { return _Py_atomic_load_ulong_relaxed(&runtime->_finalizing_id); } static inline void _PyRuntimeState_SetFinalizing(_PyRuntimeState *runtime, PyThreadState *tstate) { _Py_atomic_store_ptr_relaxed(&runtime->_finalizing, tstate); if (tstate == NULL) { _Py_atomic_store_ulong_relaxed(&runtime->_finalizing_id, 0); } else { // XXX Re-enable this assert once gh-109860 is fixed. //assert(tstate->thread_id == PyThread_get_thread_ident()); _Py_atomic_store_ulong_relaxed(&runtime->_finalizing_id, tstate->thread_id); } } #ifdef __cplusplus } #endif #endif /* !Py_INTERNAL_RUNTIME_H */
Upload File
Create Folder