Lines Matching defs:thread
44 static void resume_common(struct pthread *thread);
46 /* Resume a thread: */
48 _pthread_resume_np(pthread_t thread)
53 /* Add a reference to the thread: */
54 if ((ret = _thr_find_thread(curthread, thread, /*include dead*/0)) == 0) {
56 resume_common(thread);
57 THR_THREAD_UNLOCK(curthread, thread);
66 struct pthread *thread;
72 /* Take the thread list lock: */
75 TAILQ_FOREACH(thread, &_thread_list, tle) {
76 if (thread != curthread) {
77 THR_THREAD_LOCK(curthread, thread);
78 resume_common(thread);
79 THR_THREAD_UNLOCK(curthread, thread);
83 /* Release the thread list lock: */
91 resume_common(struct pthread *thread)
94 thread->flags &= ~(THR_FLAGS_NEED_SUSPEND | THR_FLAGS_SUSPENDED);
95 thread->cycle++;
96 _thr_umtx_wake(&thread->cycle, 1, 0);