Lines Matching refs:runtime
39 _PyRuntimeState_Init_impl(_PyRuntimeState *runtime)
41 memset(runtime, 0, sizeof(*runtime));
43 _PyGC_Initialize(&runtime->gc);
44 _PyEval_Initialize(&runtime->ceval);
46 runtime->gilstate.check_enabled = 1;
51 runtime->gilstate.autoTSSkey = initial;
53 runtime->interpreters.mutex = PyThread_allocate_lock();
54 if (runtime->interpreters.mutex == NULL) {
57 runtime->interpreters.next_id = -1;
63 _PyRuntimeState_Init(_PyRuntimeState *runtime)
70 _PyInitError err = _PyRuntimeState_Init_impl(runtime);
77 _PyRuntimeState_Fini(_PyRuntimeState *runtime)
83 if (runtime->interpreters.mutex != NULL) {
84 PyThread_free_lock(runtime->interpreters.mutex);
85 runtime->interpreters.mutex = NULL;
98 _PyInterpreterState_Enable(_PyRuntimeState *runtime)
100 runtime->interpreters.next_id = 0;
104 if (runtime->interpreters.mutex == NULL) {
110 runtime->interpreters.mutex = PyThread_allocate_lock();
114 if (runtime->interpreters.mutex == NULL) {