Home | History | Annotate | Download | only in Python

Lines Matching refs:tcur

823     PyThreadState *tcur;
830 tcur = (PyThreadState *)PyThread_get_key_value(autoTLSkey);
831 if (tcur == NULL) {
838 tcur = PyThreadState_New(autoInterpreterState);
839 if (tcur == NULL)
843 tcur->gilstate_counter = 0;
847 current = PyThreadState_IsCurrent(tcur);
849 PyEval_RestoreThread(tcur);
851 - tcur will remain valid as we hold the GIL.
855 ++tcur->gilstate_counter;
862 PyThreadState *tcur = (PyThreadState *)PyThread_get_key_value(
864 if (tcur == NULL)
872 if (! PyThreadState_IsCurrent(tcur))
874 assert(PyThreadState_IsCurrent(tcur));
875 --tcur->gilstate_counter;
876 assert(tcur->gilstate_counter >= 0); /* illegal counter value */
881 if (tcur->gilstate_counter == 0) {
884 PyThreadState_Clear(tcur);