Lines Matching refs:thread
39 pthread_internal_t* thread = __pthread_internal_find(t);
40 if (thread == NULL) {
46 !atomic_compare_exchange_weak(&thread->join_state, &old_state, THREAD_JOINED)) {
53 pid_t tid = thread->tid;
54 volatile int* tid_ptr = &thread->tid;
56 // We set thread->join_state to THREAD_JOINED with atomic operation,
57 // so no one is going to remove this thread except us.
59 // Wait for the thread to actually exit, if it hasn't already.
65 *return_value = thread->return_value;
68 __pthread_internal_remove_and_free(thread);