summaryrefslogtreecommitdiffstats
path: root/Include/internal/pycore_runtime.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/internal/pycore_runtime.h')
-rw-r--r--Include/internal/pycore_runtime.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/Include/internal/pycore_runtime.h b/Include/internal/pycore_runtime.h
index 6e06e87..6e8f16a 100644
--- a/Include/internal/pycore_runtime.h
+++ b/Include/internal/pycore_runtime.h
@@ -84,13 +84,6 @@ typedef struct pyruntimestate {
to access it, don't access it directly. */
_Py_atomic_address _finalizing;
- struct _pymem_allocators allocators;
- struct _obmalloc_global_state obmalloc;
- struct pyhash_runtime_state pyhash_state;
- struct _time_runtime_state time;
- struct _pythread_runtime_state threads;
- struct _signals_runtime_state signals;
-
struct pyinterpreters {
PyThread_type_lock mutex;
/* The linked list of interpreters, newest first. */
@@ -109,13 +102,24 @@ typedef struct pyruntimestate {
using a Python int. */
int64_t next_id;
} interpreters;
+
+ unsigned long main_thread;
+
+ /* The fields above this line are declared as early as possible to
+ facilitate out-of-process observability tools. */
+
// XXX Remove this field once we have a tp_* slot.
struct _xidregistry {
PyThread_type_lock mutex;
struct _xidregitem *head;
} xidregistry;
- unsigned long main_thread;
+ struct _pymem_allocators allocators;
+ struct _obmalloc_global_state obmalloc;
+ struct pyhash_runtime_state pyhash_state;
+ struct _time_runtime_state time;
+ struct _pythread_runtime_state threads;
+ struct _signals_runtime_state signals;
/* Used for the thread state bound to the current thread. */
Py_tss_t autoTSSkey;