Home | History | Annotate | Download | only in Python

Lines Matching refs:tcur

590     PyThreadState *tcur;

597 tcur = (PyThreadState *)PyThread_get_key_value(autoTLSkey);
598 if (tcur == NULL) {
600 tcur = PyThreadState_New(autoInterpreterState);
601 if (tcur == NULL)
605 tcur->gilstate_counter = 0;
609 current = PyThreadState_IsCurrent(tcur);
611 PyEval_RestoreThread(tcur);
613 - tcur will remain valid as we hold the GIL.
617 ++tcur->gilstate_counter;
624 PyThreadState *tcur = (PyThreadState *)PyThread_get_key_value(
626 if (tcur == NULL)
634 if (! PyThreadState_IsCurrent(tcur))
636 assert(PyThreadState_IsCurrent(tcur));
637 --tcur->gilstate_counter;
638 assert(tcur->gilstate_counter >= 0); /* illegal counter value */
643 if (tcur->gilstate_counter == 0) {
646 PyThreadState_Clear(tcur);