Lines Matching refs:curthread
47 testcancel(struct pthread *curthread) in testcancel() argument
49 if (__predict_false(SHOULD_CANCEL(curthread) && in testcancel()
50 !THR_IN_CRITICAL(curthread))) in testcancel()
55 _thr_testcancel(struct pthread *curthread) in _thr_testcancel() argument
57 testcancel(curthread); in _thr_testcancel()
63 struct pthread *curthread = _get_curthread(); in _thr_cancel() local
71 if ((ret = _thr_find_thread(curthread, pthread, 1)) == 0) { in _thr_cancel()
77 THR_THREAD_UNLOCK(curthread, pthread); in _thr_cancel()
85 struct pthread *curthread = _get_curthread(); in _thr_setcancelstate() local
99 oldval = atomic_swap_int(&curthread->cancel_enable, val); in _thr_setcancelstate()
100 if (state == PTHREAD_CANCEL_ENABLE && curthread->cancel_async) in _thr_setcancelstate()
101 testcancel(curthread); in _thr_setcancelstate()
112 struct pthread *curthread = _get_curthread(); in _thr_setcanceltype() local
115 oldval = curthread->cancel_async; in _thr_setcanceltype()
118 curthread->cancel_async = 1; in _thr_setcanceltype()
119 testcancel(curthread); in _thr_setcanceltype()
122 curthread->cancel_async = 0; in _thr_setcanceltype()
138 struct pthread *curthread; in _Tthr_testcancel() local
141 curthread = _get_curthread(); in _Tthr_testcancel()
142 testcancel(curthread); in _Tthr_testcancel()
146 _thr_cancel_enter(struct pthread *curthread) in _thr_cancel_enter() argument
148 curthread->cancel_point = 1; in _thr_cancel_enter()
149 testcancel(curthread); in _thr_cancel_enter()
153 _thr_cancel_enter2(struct pthread *curthread, int maycancel) in _thr_cancel_enter2() argument
155 curthread->cancel_point = 1; in _thr_cancel_enter2()
156 if (__predict_false(SHOULD_CANCEL(curthread) && in _thr_cancel_enter2()
157 !THR_IN_CRITICAL(curthread))) { in _thr_cancel_enter2()
159 thr_wake(curthread->tid); in _thr_cancel_enter2()
166 _thr_cancel_leave(struct pthread *curthread, int maycancel) in _thr_cancel_leave() argument
168 curthread->cancel_point = 0; in _thr_cancel_leave()
170 testcancel(curthread); in _thr_cancel_leave()