Lines Matching defs:curthread

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