34 items
NAME ↑ SIZE MODIFIED PERMS ACTIONS
.. / Parent Directory
pegen_interface.h — 953 B
2025-10-31 18:40 · rw-r--r--
953 B 2025-10-31 18:40 rw-r--r--
pycore_abstract.h — 479 B
2025-10-31 18:40 · rw-r--r--
479 B 2025-10-31 18:40 rw-r--r--
pycore_accu.h — 1.1 KB
2025-10-31 18:40 · rw-r--r--
1.1 KB 2025-10-31 18:40 rw-r--r--
pycore_atomic.h — 16.58 KB
2025-10-31 18:40 · rw-r--r--
16.58 KB 2025-10-31 18:40 rw-r--r--
pycore_bytes_methods.h — 3.3 KB
2025-10-31 18:40 · rw-r--r--
3.3 KB 2025-10-31 18:40 rw-r--r--
pycore_byteswap.h — 2.56 KB
2025-10-31 18:40 · rw-r--r--
2.56 KB 2025-10-31 18:40 rw-r--r--
pycore_call.h — 870 B
2025-10-31 18:40 · rw-r--r--
870 B 2025-10-31 18:40 rw-r--r--
pycore_ceval.h — 3.32 KB
2025-10-31 18:40 · rw-r--r--
3.32 KB 2025-10-31 18:40 rw-r--r--
pycore_code.h — 541 B
2025-10-31 18:40 · rw-r--r--
541 B 2025-10-31 18:40 rw-r--r--
pycore_condvar.h — 2.74 KB
2025-10-31 18:40 · rw-r--r--
2.74 KB 2025-10-31 18:40 rw-r--r--
pycore_context.h — 800 B
2025-10-31 18:40 · rw-r--r--
800 B 2025-10-31 18:40 rw-r--r--
pycore_dtoa.h — 646 B
2025-10-31 18:40 · rw-r--r--
646 B 2025-10-31 18:40 rw-r--r--
pycore_fileutils.h — 1.5 KB
2025-10-31 18:40 · rw-r--r--
1.5 KB 2025-10-31 18:40 rw-r--r--
pycore_gc.h — 6.49 KB
2025-10-31 18:40 · rw-r--r--
6.49 KB 2025-10-31 18:40 rw-r--r--
pycore_getopt.h — 490 B
2025-10-31 18:40 · rw-r--r--
490 B 2025-10-31 18:40 rw-r--r--
pycore_gil.h — 1.53 KB
2025-10-31 18:40 · rw-r--r--
1.53 KB 2025-10-31 18:40 rw-r--r--
pycore_hamt.h — 3.61 KB
2025-10-31 18:40 · rw-r--r--
3.61 KB 2025-10-31 18:40 rw-r--r--
pycore_hashtable.h — 4.1 KB
2025-10-31 18:40 · rw-r--r--
4.1 KB 2025-10-31 18:40 rw-r--r--
pycore_import.h — 473 B
2025-10-31 18:40 · rw-r--r--
473 B 2025-10-31 18:40 rw-r--r--
pycore_initconfig.h — 5.11 KB
2025-10-31 18:40 · rw-r--r--
5.11 KB 2025-10-31 18:40 rw-r--r--
pycore_interp.h — 5.17 KB
2025-10-31 18:40 · rw-r--r--
5.17 KB 2025-10-31 18:40 rw-r--r--
pycore_long.h — 1.51 KB
2025-10-31 18:40 · rw-r--r--
1.51 KB 2025-10-31 18:40 rw-r--r--
pycore_object.h — 4.06 KB
2025-10-31 18:40 · rw-r--r--
4.06 KB 2025-10-31 18:40 rw-r--r--
pycore_pathconfig.h — 1.89 KB
2025-10-31 18:40 · rw-r--r--
1.89 KB 2025-10-31 18:40 rw-r--r--
pycore_pyerrors.h — 1.98 KB
2025-10-31 18:40 · rw-r--r--
1.98 KB 2025-10-31 18:40 rw-r--r--
pycore_pyhash.h — 206 B
2025-10-31 18:40 · rw-r--r--
206 B 2025-10-31 18:40 rw-r--r--
pycore_pylifecycle.h — 3.65 KB
2025-10-31 18:40 · rw-r--r--
3.65 KB 2025-10-31 18:40 rw-r--r--
pycore_pymem.h — 3.28 KB
2025-10-31 18:40 · rw-r--r--
3.28 KB 2025-10-31 18:40 rw-r--r--
pycore_pystate.h — 3.5 KB
2025-10-31 18:40 · rw-r--r--
3.5 KB 2025-10-31 18:40 rw-r--r--
pycore_runtime.h — 4.35 KB
2025-10-31 18:40 · rw-r--r--
4.35 KB 2025-10-31 18:40 rw-r--r--
pycore_sysmodule.h — 548 B
2025-10-31 18:40 · rw-r--r--
548 B 2025-10-31 18:40 rw-r--r--
pycore_traceback.h — 2.98 KB
2025-10-31 18:40 · rw-r--r--
2.98 KB 2025-10-31 18:40 rw-r--r--
pycore_tupleobject.h — 442 B
2025-10-31 18:40 · rw-r--r--
442 B 2025-10-31 18:40 rw-r--r--
pycore_warnings.h — 633 B
2025-10-31 18:40 · rw-r--r--
633 B 2025-10-31 18:40 rw-r--r--
ONLINE
internal
34 items
13:07:47
TERMINAL FM
Edit
Preview
Download
Rename
Copy
Chmod
Delete
#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_atomic.h" /* _Py_atomic_address */ #include "pycore_gil.h" // struct _gil_runtime_state /* ceval state */ struct _ceval_runtime_state { /* Request for checking signals. It is shared by all interpreters (see bpo-40513). Any thread of any interpreter can receive a signal, but only the main thread of the main interpreter can handle signals: see _Py_ThreadCanHandleSignals(). */ _Py_atomic_int signals_pending; struct _gil_runtime_state gil; }; /* 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; /* Assuming the current thread holds the GIL, this is the PyThreadState for the current thread. */ _Py_atomic_address tstate_current; /* The single PyInterpreterState used by this process' GILState implementation */ /* TODO: Given interp_main, it may be possible to kill this ref */ PyInterpreterState *autoInterpreterState; Py_tss_t autoTSSkey; }; /* Runtime audit hook state */ typedef struct _Py_AuditHookEntry { struct _Py_AuditHookEntry *next; Py_AuditHookFunction hookCFunction; void *userData; } _Py_AuditHookEntry; /* Full Python runtime state */ typedef struct pyruntimestate { /* 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. */ _Py_atomic_address _finalizing; struct pyinterpreters { PyThread_type_lock mutex; PyInterpreterState *head; PyInterpreterState *main; /* _next_interp_id is an auto-numbered sequence of small integers. It gets initialized in _PyInterpreterState_Init(), 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; // XXX Remove this field once we have a tp_* slot. struct _xidregistry { PyThread_type_lock mutex; struct _xidregitem *head; } xidregistry; unsigned long main_thread; #define NEXITFUNCS 32 void (*exitfuncs[NEXITFUNCS])(void); int nexitfuncs; struct _ceval_runtime_state ceval; struct _gilstate_runtime_state gilstate; PyPreConfig preconfig; Py_OpenCodeHookFunction open_code_hook; void *open_code_userdata; _Py_AuditHookEntry *audit_hook_head; // XXX Consolidate globals found via the check-c-globals script. } _PyRuntimeState; #define _PyRuntimeState_INIT \ {.preinitialized = 0, .core_initialized = 0, .initialized = 0} /* Note: _PyRuntimeState_INIT sets other fields to 0/NULL */ PyAPI_DATA(_PyRuntimeState) _PyRuntime; PyAPI_FUNC(PyStatus) _PyRuntimeState_Init(_PyRuntimeState *runtime); PyAPI_FUNC(void) _PyRuntimeState_Fini(_PyRuntimeState *runtime); #ifdef HAVE_FORK PyAPI_FUNC(void) _PyRuntimeState_ReInitThreads(_PyRuntimeState *runtime); #endif /* Initialize _PyRuntimeState. Return NULL on success, or return an error message on failure. */ PyAPI_FUNC(PyStatus) _PyRuntime_Initialize(void); PyAPI_FUNC(void) _PyRuntime_Finalize(void); static inline PyThreadState* _PyRuntimeState_GetFinalizing(_PyRuntimeState *runtime) { return (PyThreadState*)_Py_atomic_load_relaxed(&runtime->_finalizing); } static inline void _PyRuntimeState_SetFinalizing(_PyRuntimeState *runtime, PyThreadState *tstate) { _Py_atomic_store_relaxed(&runtime->_finalizing, (uintptr_t)tstate); } #ifdef __cplusplus } #endif #endif /* !Py_INTERNAL_RUNTIME_H */