Home
last modified time | relevance | path

Searched refs:PyThreadState (Results 1 – 25 of 124) sorted by relevance

12345

/external/python/cpython2/Python/
Dpystate.c49 PyThreadState *_PyThreadState_Current = NULL;
53 static void _PyGILState_NoteThreadState(PyThreadState* tstate);
101 PyThreadState *p; in PyInterpreterState_Clear()
119 PyThreadState *p; in zapthreads()
151 threadstate_getframe(PyThreadState *self) in threadstate_getframe()
156 static PyThreadState *
159 PyThreadState *tstate = (PyThreadState *)malloc(sizeof(PyThreadState)); in new_threadstate()
210 PyThreadState *
216 PyThreadState *
223 _PyThreadState_Init(PyThreadState *tstate) in _PyThreadState_Init()
[all …]
/external/python/cpython3/Include/internal/
Dpycore_pylifecycle.h23 extern PyStatus _PyUnicode_InitEncodings(PyThreadState *tstate);
36 extern int _PyLong_Init(PyThreadState *tstate);
39 extern PyObject * _PyBuiltin_Init(PyThreadState *tstate);
41 PyThreadState *tstate,
45 extern int _PySys_InitMain(PyThreadState *tstate);
49 extern PyStatus _PyImportHooks_Init(PyThreadState *tstate);
55 extern PyStatus _PyImportZip_Init(PyThreadState *tstate);
56 extern PyStatus _PyGC_Init(PyThreadState *tstate);
77 extern void _PyGC_Fini(PyThreadState *tstate);
80 extern void _PyUnicode_Fini(PyThreadState *tstate);
[all …]
Dpycore_ceval.h17 extern void _Py_FinishPendingCalls(PyThreadState *tstate);
26 PyAPI_FUNC(void) _PyEval_SignalAsyncExc(PyThreadState *tstate);
31 PyThreadState *tstate,
38 _PyEval_EvalFrame(PyThreadState *tstate, PyFrameObject *f, int throwflag) in _PyEval_EvalFrame()
44 PyThreadState *tstate,
54 extern PyStatus _PyEval_InitGIL(PyThreadState *tstate);
55 extern void _PyEval_FiniGIL(PyThreadState *tstate);
57 extern void _PyEval_ReleaseLock(PyThreadState *tstate);
67 static inline int _Py_MakeRecCheck(PyThreadState *tstate) { in _Py_MakeRecCheck()
72 static inline int _Py_MakeRecCheck(PyThreadState *tstate) { in _Py_MakeRecCheck()
[all …]
Dpycore_pyerrors.h11 static inline PyObject* _PyErr_Occurred(PyThreadState *tstate) in _PyErr_Occurred()
33 PyThreadState *tstate,
39 PyThreadState *tstate,
43 PyThreadState *tstate,
49 PyThreadState *tstate,
56 PyAPI_FUNC(void) _PyErr_Clear(PyThreadState *tstate);
58 PyAPI_FUNC(void) _PyErr_SetNone(PyThreadState *tstate, PyObject *exception);
60 PyAPI_FUNC(PyObject *) _PyErr_NoMemory(PyThreadState *tstate);
63 PyThreadState *tstate,
68 PyThreadState *tstate,
[all …]
Dpycore_pystate.h25 _Py_IsMainInterpreter(PyThreadState* tstate) in _Py_IsMainInterpreter()
52 static inline PyThreadState*
55 return (PyThreadState*)_Py_atomic_load_relaxed(&runtime->gilstate.tstate_current); in _PyRuntimeState_GetThreadState()
67 static inline PyThreadState*
80 _Py_EnsureFuncTstateNotNULL(const char *func, PyThreadState *tstate) in _Py_EnsureFuncTstateNotNULL()
101 PyThreadState *tstate = _PyThreadState_GET(); in _PyInterpreterState_GET()
112 PyThreadState *tstate);
115 PyThreadState *tstate);
117 PyAPI_FUNC(PyThreadState *) _PyThreadState_Swap(
119 PyThreadState *newts);
[all …]
Dpycore_call.h12 PyThreadState *tstate,
19 PyThreadState *tstate,
26 PyThreadState *tstate,
32 _PyObject_CallNoArgTstate(PyThreadState *tstate, PyObject *func) { in _PyObject_CallNoArgTstate()
Dpycore_runtime.h131 static inline PyThreadState*
133 return (PyThreadState*)_Py_atomic_load_relaxed(&runtime->_finalizing); in _PyRuntimeState_GetFinalizing()
137 _PyRuntimeState_SetFinalizing(_PyRuntimeState *runtime, PyThreadState *tstate) { in _PyRuntimeState_SetFinalizing()
/external/python/cpython2/Include/
Dpystate.h103 } PyThreadState; typedef
110 PyAPI_FUNC(PyThreadState *) PyThreadState_New(PyInterpreterState *);
111 PyAPI_FUNC(PyThreadState *) _PyThreadState_Prealloc(PyInterpreterState *);
112 PyAPI_FUNC(void) _PyThreadState_Init(PyThreadState *);
113 PyAPI_FUNC(void) PyThreadState_Clear(PyThreadState *);
114 PyAPI_FUNC(void) PyThreadState_Delete(PyThreadState *);
119 PyAPI_FUNC(PyThreadState *) PyThreadState_Get(void);
120 PyAPI_FUNC(PyThreadState *) PyThreadState_Swap(PyThreadState *);
127 PyAPI_DATA(PyThreadState *) _PyThreadState_Current;
178 PyAPI_FUNC(PyThreadState *) PyGILState_GetThisThreadState(void);
[all …]
Dceval.h117 PyAPI_FUNC(PyThreadState *) PyEval_SaveThread(void);
118 PyAPI_FUNC(void) PyEval_RestoreThread(PyThreadState *);
126 PyAPI_FUNC(void) PyEval_AcquireThread(PyThreadState *tstate);
127 PyAPI_FUNC(void) PyEval_ReleaseThread(PyThreadState *tstate);
131 PyThreadState *_save; \
/external/python/cpython3/Include/
Dpystate.h20 typedef struct _ts PyThreadState; typedef
58 PyAPI_FUNC(PyThreadState *) PyThreadState_New(PyInterpreterState *);
59 PyAPI_FUNC(void) PyThreadState_Clear(PyThreadState *);
60 PyAPI_FUNC(void) PyThreadState_Delete(PyThreadState *);
70 PyAPI_FUNC(PyThreadState *) PyThreadState_Get(void);
83 PyAPI_FUNC(PyThreadState *) PyThreadState_Swap(PyThreadState *);
89 PyAPI_FUNC(PyInterpreterState*) PyThreadState_GetInterpreter(PyThreadState *tstate);
90 PyAPI_FUNC(PyFrameObject*) PyThreadState_GetFrame(PyThreadState *tstate);
91 PyAPI_FUNC(uint64_t) PyThreadState_GetID(PyThreadState *tstate);
138 PyAPI_FUNC(PyThreadState *) PyGILState_GetThisThreadState(void);
Dceval.h126 PyAPI_FUNC(PyThreadState *) PyEval_SaveThread(void);
127 PyAPI_FUNC(void) PyEval_RestoreThread(PyThreadState *);
137 PyAPI_FUNC(void) PyEval_AcquireThread(PyThreadState *tstate);
138 PyAPI_FUNC(void) PyEval_ReleaseThread(PyThreadState *tstate);
141 PyThreadState *_save; \
/external/python/cpython3/Python/
Dpystate.c37 ((PyThreadState*)_Py_atomic_load_relaxed(&(gilstate)->tstate_current))
43 static PyThreadState *_PyGILState_GetThisThreadState(struct _gilstate_runtime_state *gilstate);
44 static void _PyThreadState_Delete(PyThreadState *tstate, int check_current);
168 struct _gilstate_runtime_state *gilstate, PyThreadState* tstate);
199 PyThreadState *tstate = _PyThreadState_GET(); in PyInterpreterState_New()
283 PyThreadState *tstate = _PyThreadState_GET(); in PyInterpreterState_Clear()
289 for (PyThreadState *p = interp->tstate_head; p != NULL; p = p->next) { in PyInterpreterState_Clear()
325 PyThreadState *tstate; in zapthreads()
386 PyThreadState *tstate = _PyThreadState_Swap(gilstate, NULL); in _PyInterpreterState_DeleteExceptMain()
423 PyThreadState *tstate = _PyThreadState_GET(); in PyInterpreterState_Get()
[all …]
Derrors.c35 _PyErr_FormatV(PyThreadState *tstate, PyObject *exception,
40 _PyErr_Restore(PyThreadState *tstate, PyObject *type, PyObject *value, in _PyErr_Restore()
70 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_Restore()
76 _PyErr_GetTopmostException(PyThreadState *tstate) in _PyErr_GetTopmostException()
102 _PyErr_SetObject(PyThreadState *tstate, PyObject *exception, PyObject *value) in _PyErr_SetObject()
168 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_SetObject()
178 PyThreadState *tstate = _PyThreadState_GET(); in _PyErr_SetKeyError()
189 _PyErr_SetNone(PyThreadState *tstate, PyObject *exception) in _PyErr_SetNone()
198 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_SetNone()
204 _PyErr_SetString(PyThreadState *tstate, PyObject *exception, in _PyErr_SetString()
[all …]
Dpylifecycle.c59 static PyStatus init_sys_streams(PyThreadState *tstate);
60 static void call_py_exitfuncs(PyThreadState *tstate);
61 static void wait_for_thread_shutdown(PyThreadState *tstate);
142 init_importlib(PyThreadState *tstate, PyObject *sysmod) in init_importlib()
194 init_importlib_external(PyThreadState *tstate) in init_importlib_external()
447 PyThreadState **tstate_p, in pyinit_core_reconfigure()
451 PyThreadState *tstate = _PyThreadState_GET(); in pyinit_core_reconfigure()
521 init_interp_create_gil(PyThreadState *tstate) in init_interp_create_gil()
548 PyThreadState **tstate_p) in pycore_create_interpreter()
560 PyThreadState *tstate = PyThreadState_New(interp); in pycore_create_interpreter()
[all …]
Dsysmodule.c65 sys_get_object_id(PyThreadState *tstate, _Py_Identifier *key) in sys_get_object_id()
77 PyThreadState *tstate = _PyThreadState_GET(); in _PySys_GetObjectId()
84 PyThreadState *tstate = _PyThreadState_GET(); in PySys_GetObject()
93 sys_set_object_id(PyThreadState *tstate, _Py_Identifier *key, PyObject *v) in sys_set_object_id()
112 PyThreadState *tstate = _PyThreadState_GET(); in _PySys_SetObjectId()
117 sys_set_object(PyThreadState *tstate, const char *name, PyObject *v) in sys_set_object()
136 PyThreadState *tstate = _PyThreadState_GET(); in PySys_SetObject()
157 sys_audit_tstate(PyThreadState *ts, const char *event, in sys_audit_tstate()
291 _PySys_Audit(PyThreadState *tstate, const char *event, in _PySys_Audit()
308 PyThreadState *tstate = _PyThreadState_GET(); in PySys_Audit()
[all …]
Dceval.c49 PyThreadState *tstate, PyObject ***pp_stack,
52 PyThreadState *tstate, PyObject *func,
57 static int prtrace(PyThreadState *, PyObject *, const char *);
60 PyThreadState *, PyFrameObject *,
63 PyThreadState *, PyFrameObject *,
66 PyThreadState *, PyFrameObject *);
68 PyThreadState *, PyFrameObject *,
74 static PyObject * import_name(PyThreadState *, PyFrameObject *,
76 static PyObject * import_from(PyThreadState *, PyObject *, PyObject *);
77 static int import_all_from(PyThreadState *, PyObject *, PyObject *);
[all …]
Dceval_gil.h145 PyThreadState *tstate) in drop_gil()
170 if (((PyThreadState*)_Py_atomic_load_relaxed(&gil->last_holder)) == tstate) in drop_gil()
194 tstate_must_exit(PyThreadState *tstate) in tstate_must_exit()
200 PyThreadState *finalizing = _PyRuntimeState_GetFinalizing(&_PyRuntime); in tstate_must_exit()
211 take_gil(PyThreadState *tstate) in take_gil()
275 if (tstate != (PyThreadState*)_Py_atomic_load_relaxed(&gil->last_holder)) { in take_gil()
Dimport.c31 static PyObject *import_add_module(PyThreadState *tstate, PyObject *name);
55 _PyImportHooks_Init(PyThreadState *tstate) in _PyImportHooks_Init()
92 _PyImportZip_Init(PyThreadState *tstate) in _PyImportZip_Init()
173 PyThreadState *tstate = PyEval_SaveThread(); in _PyImport_AcquireLock()
343 PyThreadState *tstate = _PyThreadState_GET(); in _PyImport_SetModule()
351 PyThreadState *tstate = _PyThreadState_GET(); in _PyImport_SetModuleString()
357 import_get_module(PyThreadState *tstate, PyObject *name) in import_get_module()
384 import_ensure_initialized(PyThreadState *tstate, PyObject *mod, PyObject *name) in import_ensure_initialized()
431 _PyImport_Cleanup(PyThreadState *tstate) in _PyImport_Cleanup()
701 PyThreadState *tstate = _PyThreadState_GET(); in _PyImport_FixupExtensionObject()
[all …]
/external/python/cpython3/Objects/
Dcall.c12 _PyStack_UnpackDict(PyThreadState *tstate,
22 null_error(PyThreadState *tstate) in null_error()
33 _Py_CheckFunctionResult(PyThreadState *tstate, PyObject *callable, in _Py_CheckFunctionResult()
88 PyThreadState *tstate = _PyThreadState_GET(); in PyObject_CallNoArgs()
94 _PyObject_FastCallDictTstate(PyThreadState *tstate, PyObject *callable, in _PyObject_FastCallDictTstate()
141 PyThreadState *tstate = _PyThreadState_GET(); in PyObject_VectorcallDict()
147 _PyObject_MakeTpCall(PyThreadState *tstate, PyObject *callable, in _PyObject_MakeTpCall()
207 PyThreadState *tstate = _PyThreadState_GET(); in PyVectorcall_Call()
251 _PyObject_Call(PyThreadState *tstate, PyObject *callable, in _PyObject_Call()
291 PyThreadState *tstate = _PyThreadState_GET(); in PyObject_Call()
[all …]
/external/python/cpython3/Include/cpython/
Dpystate.h146 PyAPI_FUNC(PyThreadState *) _PyThreadState_Prealloc(PyInterpreterState *);
150 PyAPI_FUNC(PyThreadState *) _PyThreadState_UncheckedGet(void);
152 PyAPI_FUNC(PyObject *) _PyThreadState_GetDict(PyThreadState *tstate);
181 PyAPI_FUNC(PyThreadState *) PyInterpreterState_ThreadHead(PyInterpreterState *);
182 PyAPI_FUNC(PyThreadState *) PyThreadState_Next(PyThreadState *);
187 typedef PyObject* (*_PyFrameEvalFunction)(PyThreadState *tstate, PyFrameObject *, int);
Dabstract.h41 PyThreadState *tstate,
52 PyThreadState *tstate,
103 _PyObject_VectorcallTstate(PyThreadState *tstate, PyObject *callable, in _PyObject_VectorcallTstate()
126 PyThreadState *tstate = PyThreadState_GET(); in PyObject_Vectorcall()
153 _PyObject_FastCallTstate(PyThreadState *tstate, PyObject *func, PyObject *const *args, Py_ssize_t n… in _PyObject_FastCallTstate()
162 PyThreadState *tstate = PyThreadState_GET(); in _PyObject_FastCall()
171 PyThreadState *tstate = PyThreadState_GET(); in _PyObject_CallNoArg()
180 PyThreadState *tstate; in PyObject_CallOneArg()
Dceval.h10 PyAPI_DATA(int) _PyEval_SetProfile(PyThreadState *tstate, Py_tracefunc func, PyObject *arg);
12 PyAPI_FUNC(int) _PyEval_SetTrace(PyThreadState *tstate, Py_tracefunc func, PyObject *arg);
26 PyAPI_FUNC(PyObject *) _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int exc);
/external/python/cffi/c/
Dmisc_thread_common.h77 PyThreadState *tstate;
150 PyThreadState *tstate = NULL; in thread_canary_free_zombies()
174 thread_canary_register(PyThreadState *tstate) in thread_canary_register()
319 static PyThreadState *get_current_ts(void) in get_current_ts()
324 return (PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current); in get_current_ts()
326 return (PyThreadState*)_PyThreadState_Current; /* assume atomic read */ in get_current_ts()
336 PyThreadState *ts = PyGILState_GetThisThreadState(); in gil_ensure()
/external/python/cpython3/Modules/
Dgcmodule.c156 _PyGC_Init(PyThreadState *tstate) in _PyGC_Init()
919 handle_legacy_finalizers(PyThreadState *tstate, in handle_legacy_finalizers()
946 finalize_garbage(PyThreadState *tstate, PyGC_Head *collectable) in finalize_garbage()
982 delete_garbage(PyThreadState *tstate, GCState *gcstate, in delete_garbage()
1170 collect(PyThreadState *tstate, int generation, in collect()
1337 invoke_gc_callback(PyThreadState *tstate, const char *phase, in invoke_gc_callback()
1382 collect_with_callback(PyThreadState *tstate, int generation) in collect_with_callback()
1394 collect_generations(PyThreadState *tstate) in collect_generations()
1461 PyThreadState *tstate = _PyThreadState_GET(); in gc_enable_impl()
1477 PyThreadState *tstate = _PyThreadState_GET(); in gc_disable_impl()
[all …]
/external/python/cpython2/Mac/Modules/
DautoGIL.c21 PyThreadState **p_tstate = (PyThreadState **)info; in autoGILCallback()
56 PyThreadState **p_tstate; /* for use in the info field */ in autoGIL_installAutoGIL()
76 p_tstate = PyMem_Malloc(sizeof(PyThreadState *)); in autoGIL_installAutoGIL()

12345