Home
last modified time | relevance | path

Searched refs:tstate (Results 1 – 25 of 69) sorted by relevance

123

/external/python/cpython3/Python/
Dpystate.c95 static void _PyGILState_NoteThreadState(PyThreadState* tstate);
339 PyThreadState *tstate = PyInterpreterState_ThreadHead(interp); in _PyInterpreterState_IDDecref() local
341 PyThreadState *save_tstate = PyThreadState_Swap(tstate); in _PyInterpreterState_IDDecref()
342 Py_EndInterpreter(tstate); in _PyInterpreterState_IDDecref()
358 PyThreadState *tstate = (PyThreadState *)PyMem_RawMalloc(sizeof(PyThreadState)); in new_threadstate() local
363 if (tstate != NULL) { in new_threadstate()
364 tstate->interp = interp; in new_threadstate()
366 tstate->frame = NULL; in new_threadstate()
367 tstate->recursion_depth = 0; in new_threadstate()
368 tstate->overflowed = 0; in new_threadstate()
[all …]
Dceval.c178 PyThreadState *tstate = PyThreadState_GET(); in PyEval_AcquireLock() local
179 if (tstate == NULL) in PyEval_AcquireLock()
181 take_gil(tstate); in PyEval_AcquireLock()
196 PyEval_AcquireThread(PyThreadState *tstate) in PyEval_AcquireThread() argument
198 if (tstate == NULL) in PyEval_AcquireThread()
202 take_gil(tstate); in PyEval_AcquireThread()
203 if (PyThreadState_Swap(tstate) != NULL) in PyEval_AcquireThread()
209 PyEval_ReleaseThread(PyThreadState *tstate) in PyEval_ReleaseThread() argument
211 if (tstate == NULL) in PyEval_ReleaseThread()
213 if (PyThreadState_Swap(NULL) != tstate) in PyEval_ReleaseThread()
[all …]
Derrors.c31 PyThreadState *tstate = PyThreadState_GET(); in PyErr_Restore() local
43 oldtype = tstate->curexc_type; in PyErr_Restore()
44 oldvalue = tstate->curexc_value; in PyErr_Restore()
45 oldtraceback = tstate->curexc_traceback; in PyErr_Restore()
47 tstate->curexc_type = type; in PyErr_Restore()
48 tstate->curexc_value = value; in PyErr_Restore()
49 tstate->curexc_traceback = traceback; in PyErr_Restore()
57 _PyErr_GetTopmostException(PyThreadState *tstate) in _PyErr_GetTopmostException() argument
59 _PyErr_StackItem *exc_info = tstate->exc_info; in _PyErr_GetTopmostException()
85 PyThreadState *tstate = PyThreadState_GET(); in PyErr_SetObject() local
[all …]
Dceval_gil.h149 static void drop_gil(PyThreadState *tstate) in drop_gil() argument
154 if (tstate != NULL) { in drop_gil()
159 (uintptr_t)tstate); in drop_gil()
170 tstate != NULL) in drop_gil()
176 ) == tstate) in drop_gil()
191 static void take_gil(PyThreadState *tstate) in take_gil() argument
194 if (tstate == NULL) in take_gil()
228 if (tstate != (PyThreadState*)_Py_atomic_load_relaxed( in take_gil()
232 (uintptr_t)tstate); in take_gil()
243 if (tstate->async_exc != NULL) { in take_gil()
Dpylifecycle.c643 PyThreadState *tstate = PyThreadState_GET(); in _Py_InitializeCore_impl() local
644 if (!tstate) { in _Py_InitializeCore_impl()
648 interp = tstate->interp; in _Py_InitializeCore_impl()
718 PyThreadState *tstate = PyThreadState_New(interp); in _Py_InitializeCore_impl() local
719 if (tstate == NULL) in _Py_InitializeCore_impl()
721 (void) PyThreadState_Swap(tstate); in _Py_InitializeCore_impl()
731 _PyGILState_Init(interp, tstate); in _Py_InitializeCore_impl()
1123 PyThreadState *tstate; in Py_FinalizeEx() local
1132 tstate = PyThreadState_GET(); in Py_FinalizeEx()
1133 interp = tstate->interp; in Py_FinalizeEx()
[all …]
Dtraceback.c784 dump_traceback(int fd, PyThreadState *tstate, int write_header) in dump_traceback() argument
792 frame = _PyThreadState_GetFrame(tstate); in dump_traceback()
817 _Py_DumpTraceback(int fd, PyThreadState *tstate) in _Py_DumpTraceback() argument
819 dump_traceback(fd, tstate, 1); in _Py_DumpTraceback()
828 write_thread_id(int fd, PyThreadState *tstate, int is_current) in write_thread_id() argument
835 tstate->thread_id, in write_thread_id()
850 PyThreadState *tstate; in _Py_DumpTracebackThreads() local
883 tstate = PyInterpreterState_ThreadHead(interp); in _Py_DumpTracebackThreads()
884 if (tstate == NULL) in _Py_DumpTracebackThreads()
888 tstate = PyInterpreterState_ThreadHead(interp); in _Py_DumpTracebackThreads()
[all …]
Dsysmodule.c59 PyThreadState *tstate = PyThreadState_GET(); in _PySys_GetObjectId() local
60 PyObject *sd = tstate->interp->sysdict; in _PySys_GetObjectId()
69 PyThreadState *tstate = PyThreadState_GET(); in PySys_GetObject() local
70 PyObject *sd = tstate->interp->sysdict; in PySys_GetObject()
79 PyThreadState *tstate = PyThreadState_GET(); in _PySys_SetObjectId() local
80 PyObject *sd = tstate->interp->sysdict; in _PySys_SetObjectId()
94 PyThreadState *tstate = PyThreadState_GET(); in PySys_SetObject() local
95 PyObject *sd = tstate->interp->sysdict; in PySys_SetObject()
578 PyThreadState *tstate = PyThreadState_GET(); in sys_gettrace() local
579 PyObject *temp = tstate->c_traceobj; in sys_gettrace()
[all …]
/external/python/cpython2/Python/
Dpystate.c53 static void _PyGILState_NoteThreadState(PyThreadState* tstate);
159 PyThreadState *tstate = (PyThreadState *)malloc(sizeof(PyThreadState)); in new_threadstate() local
164 if (tstate != NULL) { in new_threadstate()
165 tstate->interp = interp; in new_threadstate()
167 tstate->frame = NULL; in new_threadstate()
168 tstate->recursion_depth = 0; in new_threadstate()
169 tstate->tracing = 0; in new_threadstate()
170 tstate->use_tracing = 0; in new_threadstate()
171 tstate->tick_counter = 0; in new_threadstate()
172 tstate->gilstate_counter = 0; in new_threadstate()
[all …]
Dceval.c86 PyThreadState *tstate = PyThreadState_Get(); in dump_tsc() local
87 if (!tstate->interp->tscdump) in dump_tsc()
271 PyEval_AcquireThread(PyThreadState *tstate) in PyEval_AcquireThread() argument
273 if (tstate == NULL) in PyEval_AcquireThread()
278 if (PyThreadState_Swap(tstate) != NULL) in PyEval_AcquireThread()
284 PyEval_ReleaseThread(PyThreadState *tstate) in PyEval_ReleaseThread() argument
286 if (tstate == NULL) in PyEval_ReleaseThread()
288 if (PyThreadState_Swap(NULL) != tstate) in PyEval_ReleaseThread()
302 PyThreadState *tstate; in PyEval_ReInitThreads() local
317 tstate = PyThreadState_GET(); in PyEval_ReInitThreads()
[all …]
Dsysmodule.c52 PyThreadState *tstate = PyThreadState_GET(); in PySys_GetObject() local
53 PyObject *sd = tstate->interp->sysdict; in PySys_GetObject()
74 PyThreadState *tstate = PyThreadState_GET(); in PySys_SetObject() local
75 PyObject *sd = tstate->interp->sysdict; in PySys_SetObject()
152 PyThreadState *tstate; in sys_exc_info() local
153 tstate = PyThreadState_GET(); in sys_exc_info()
156 tstate->exc_type != NULL ? tstate->exc_type : Py_None, in sys_exc_info()
157 tstate->exc_value != NULL ? tstate->exc_value : Py_None, in sys_exc_info()
158 tstate->exc_traceback != NULL ? in sys_exc_info()
159 tstate->exc_traceback : Py_None); in sys_exc_info()
[all …]
Derrors.c27 PyThreadState *tstate = PyThreadState_GET(); in PyErr_Restore() local
39 oldtype = tstate->curexc_type; in PyErr_Restore()
40 oldvalue = tstate->curexc_value; in PyErr_Restore()
41 oldtraceback = tstate->curexc_traceback; in PyErr_Restore()
43 tstate->curexc_type = type; in PyErr_Restore()
44 tstate->curexc_value = value; in PyErr_Restore()
45 tstate->curexc_traceback = traceback; in PyErr_Restore()
78 PyThreadState *tstate = PyThreadState_GET(); in PyErr_Occurred() local
80 return tstate->curexc_type; in PyErr_Occurred()
151 PyThreadState *tstate = NULL; in PyErr_NormalizeException() local
[all …]
Dpythonrun.c165 PyThreadState *tstate; in Py_InitializeEx() local
207 tstate = PyThreadState_New(interp); in Py_InitializeEx()
208 if (tstate == NULL) in Py_InitializeEx()
210 (void) PyThreadState_Swap(tstate); in Py_InitializeEx()
287 _PyGILState_Init(interp, tstate); in Py_InitializeEx()
414 PyThreadState *tstate; in Py_Finalize() local
434 tstate = PyThreadState_GET(); in Py_Finalize()
435 interp = tstate->interp; in Py_Finalize()
588 PyThreadState *tstate, *save_tstate; in Py_NewInterpreter() local
598 tstate = PyThreadState_New(interp); in Py_NewInterpreter()
[all …]
Dtraceback.c108 PyThreadState *tstate = PyThreadState_GET(); in PyTraceBack_Here() local
109 PyTracebackObject *oldtb = (PyTracebackObject *) tstate->curexc_traceback; in PyTraceBack_Here()
113 tstate->curexc_traceback = (PyObject *)tb; in PyTraceBack_Here()
/external/python/cpython3/Modules/
D_threadmodule.c768 PyThreadState *tstate; in local_clear() local
775 && (tstate = PyThreadState_Get()) in local_clear()
776 && tstate->interp) { in local_clear()
777 for(tstate = PyInterpreterState_ThreadHead(tstate->interp); in local_clear()
778 tstate; in local_clear()
779 tstate = PyThreadState_Next(tstate)) in local_clear()
780 if (tstate->dict && PyDict_GetItem(tstate->dict, self->key)) { in local_clear()
781 if (PyDict_DelItem(tstate->dict, self->key)) { in local_clear()
979 PyThreadState *tstate; member
986 PyThreadState *tstate; in t_bootstrap() local
[all …]
Dfaulthandler.c207 PyThreadState *tstate = _PyThreadState_UncheckedGet(); in get_thread_state() local
208 if (tstate == NULL) { in get_thread_state()
214 return tstate; in get_thread_state()
222 PyThreadState *tstate; in faulthandler_dump_traceback() local
237 tstate = PyGILState_GetThisThreadState(); in faulthandler_dump_traceback()
240 (void)_Py_DumpTracebackThreads(fd, NULL, tstate); in faulthandler_dump_traceback()
243 if (tstate != NULL) in faulthandler_dump_traceback()
244 _Py_DumpTraceback(fd, tstate); in faulthandler_dump_traceback()
257 PyThreadState *tstate; in faulthandler_dump_traceback_py() local
270 tstate = get_thread_state(); in faulthandler_dump_traceback_py()
[all …]
/external/python/cpython2/Modules/
Dthreadmodule.c398 PyThreadState *tstate; in local_clear() local
405 && (tstate = PyThreadState_Get()) in local_clear()
406 && tstate->interp) { in local_clear()
407 for(tstate = PyInterpreterState_ThreadHead(tstate->interp); in local_clear()
408 tstate; in local_clear()
409 tstate = PyThreadState_Next(tstate)) in local_clear()
410 if (tstate->dict && in local_clear()
411 PyDict_GetItem(tstate->dict, self->key)) in local_clear()
412 PyDict_DelItem(tstate->dict, self->key); in local_clear()
605 PyThreadState *tstate; member
[all …]
Dpyexpat.c273 trace_frame(PyThreadState *tstate, PyFrameObject *f, int code, PyObject *val) in trace_frame() argument
276 if (!tstate->use_tracing || tstate->tracing) in trace_frame()
278 if (tstate->c_profilefunc != NULL) { in trace_frame()
279 tstate->tracing++; in trace_frame()
280 result = tstate->c_profilefunc(tstate->c_profileobj, in trace_frame()
282 tstate->use_tracing = ((tstate->c_tracefunc != NULL) in trace_frame()
283 || (tstate->c_profilefunc != NULL)); in trace_frame()
284 tstate->tracing--; in trace_frame()
288 if (tstate->c_tracefunc != NULL) { in trace_frame()
289 tstate->tracing++; in trace_frame()
[all …]
/external/strace/linux/sparc64/
Dset_error.c4 sparc_regs.tstate |= 0x1100000000UL; in arch_set_error()
12 sparc_regs.tstate &= ~0x1100000000UL; in arch_set_success()
/external/python/cpython2/Objects/
Dgenobject.c47 PyThreadState *tstate = PyThreadState_GET(); in gen_send_ex() local
79 f->f_tstate = tstate; in gen_send_ex()
80 Py_XINCREF(tstate->frame); in gen_send_ex()
82 f->f_back = tstate->frame; in gen_send_ex()
91 assert(f->f_back == tstate->frame); in gen_send_ex()
/external/python/cpython2/Demo/pysvr/
Dpysvr.c278 PyThreadState *tstate; in run_interpreter() local
286 tstate = Py_NewInterpreter(); in run_interpreter()
287 if (tstate == NULL) { in run_interpreter()
337 Py_EndInterpreter(tstate); in run_interpreter()
/external/python/cpython3/Objects/
Dgenobject.c154 PyThreadState *tstate = PyThreadState_GET(); in gen_send_ex() local
214 Py_XINCREF(tstate->frame); in gen_send_ex()
216 f->f_back = tstate->frame; in gen_send_ex()
219 gen->gi_exc_state.previous_item = tstate->exc_info; in gen_send_ex()
220 tstate->exc_info = &gen->gi_exc_state; in gen_send_ex()
222 tstate->exc_info = gen->gi_exc_state.previous_item; in gen_send_ex()
229 assert(f->f_back == tstate->frame); in gen_send_ex()
1162 PyThreadState *tstate = PyThreadState_GET(); in PyCoro_New() local
1163 int origin_depth = tstate->coroutine_origin_tracking_depth; in PyCoro_New()
1262 PyThreadState *tstate; in async_gen_init_hooks() local
[all …]
/external/python/cpython3/Include/internal/
Dpystate.h121 #define _Py_CURRENTLY_FINALIZING(tstate) \ argument
122 (_PyRuntime.finalizing == tstate)
/external/swiftshader/third_party/llvm-7.0/llvm/test/MC/Sparc/
Dsparcv9-instructions.s123 ! V8-NEXT: wrpr %g6,%i6,%tstate
124 ! V9: wrpr %g6, %fp, %tstate ! encoding: [0x85,0x91,0x80,0x1e]
125 wrpr %g6,%i6,%tstate
184 ! V8-NEXT: wrpr %g6,255,%tstate
185 ! V9: wrpr %g6, 255, %tstate ! encoding: [0x85,0x91,0xa0,0xff]
186 wrpr %g6,255,%tstate
245 ! V8-NEXT: rdpr %tstate,%i5
246 ! V9: rdpr %tstate, %i5 ! encoding: [0xbb,0x50,0x80,0x00]
247 rdpr %tstate,%i5
/external/llvm/test/MC/Sparc/
Dsparcv9-instructions.s123 ! V8-NEXT: wrpr %g6,%i6,%tstate
124 ! V9: wrpr %g6, %fp, %tstate ! encoding: [0x85,0x91,0x80,0x1e]
125 wrpr %g6,%i6,%tstate
184 ! V8-NEXT: wrpr %g6,255,%tstate
185 ! V9: wrpr %g6, 255, %tstate ! encoding: [0x85,0x91,0xa0,0xff]
186 wrpr %g6,255,%tstate
245 ! V8-NEXT: rdpr %tstate,%i5
246 ! V9: rdpr %tstate, %i5 ! encoding: [0xbb,0x50,0x80,0x00]
247 rdpr %tstate,%i5
/external/python/cpython2/Include/
Dceval.h126 PyAPI_FUNC(void) PyEval_AcquireThread(PyThreadState *tstate);
127 PyAPI_FUNC(void) PyEval_ReleaseThread(PyThreadState *tstate);

123