Lines Matching refs:curthread

51 	struct pthread *curthread = _get_curthread();  in _pthread_suspend_np()  local
59 else if ((ret = _thr_ref_add(curthread, thread, /*include dead*/0)) in _pthread_suspend_np()
62 THR_THREAD_LOCK(curthread, thread); in _pthread_suspend_np()
63 suspend_common(curthread, thread, 1); in _pthread_suspend_np()
65 THR_THREAD_UNLOCK(curthread, thread); in _pthread_suspend_np()
68 _thr_ref_delete(curthread, thread); in _pthread_suspend_np()
74 _thr_suspend_all_lock(struct pthread *curthread) in _thr_suspend_all_lock() argument
78 THR_LOCK_ACQUIRE(curthread, &_suspend_all_lock); in _thr_suspend_all_lock()
82 THR_LOCK_RELEASE(curthread, &_suspend_all_lock); in _thr_suspend_all_lock()
84 THR_LOCK_ACQUIRE(curthread, &_suspend_all_lock); in _thr_suspend_all_lock()
87 _single_thread = curthread; in _thr_suspend_all_lock()
88 THR_LOCK_RELEASE(curthread, &_suspend_all_lock); in _thr_suspend_all_lock()
92 _thr_suspend_all_unlock(struct pthread *curthread) in _thr_suspend_all_unlock() argument
95 THR_LOCK_ACQUIRE(curthread, &_suspend_all_lock); in _thr_suspend_all_unlock()
101 THR_LOCK_RELEASE(curthread, &_suspend_all_lock); in _thr_suspend_all_unlock()
107 struct pthread *curthread = _get_curthread(); in _thr_suspend_all_np() local
112 old_nocancel = curthread->no_cancel; in _thr_suspend_all_np()
113 curthread->no_cancel = 1; in _thr_suspend_all_np()
114 _thr_suspend_all_lock(curthread); in _thr_suspend_all_np()
115 THREAD_LIST_RDLOCK(curthread); in _thr_suspend_all_np()
117 if (thread != curthread) { in _thr_suspend_all_np()
118 THR_THREAD_LOCK(curthread, thread); in _thr_suspend_all_np()
122 THR_THREAD_UNLOCK(curthread, thread); in _thr_suspend_all_np()
129 if (thread != curthread) { in _thr_suspend_all_np()
131 THR_THREAD_LOCK(curthread, thread); in _thr_suspend_all_np()
132 ret = suspend_common(curthread, thread, 0); in _thr_suspend_all_np()
134 THREAD_LIST_UNLOCK(curthread); in _thr_suspend_all_np()
136 THR_REF_ADD(curthread, thread); in _thr_suspend_all_np()
137 suspend_common(curthread, thread, 1); in _thr_suspend_all_np()
138 THR_REF_DEL(curthread, thread); in _thr_suspend_all_np()
139 _thr_try_gc(curthread, thread); in _thr_suspend_all_np()
142 THREAD_LIST_RDLOCK(curthread); in _thr_suspend_all_np()
150 THR_THREAD_UNLOCK(curthread, thread); in _thr_suspend_all_np()
153 THREAD_LIST_UNLOCK(curthread); in _thr_suspend_all_np()
154 _thr_suspend_all_unlock(curthread); in _thr_suspend_all_np()
155 curthread->no_cancel = old_nocancel; in _thr_suspend_all_np()
156 _thr_testcancel(curthread); in _thr_suspend_all_np()
160 suspend_common(struct pthread *curthread, struct pthread *thread, in suspend_common() argument
173 THR_THREAD_UNLOCK(curthread, thread); in suspend_common()
176 THR_THREAD_LOCK(curthread, thread); in suspend_common()
178 THR_THREAD_LOCK(curthread, thread); in suspend_common()