Lines Matching refs:pthread
65 static TAILQ_HEAD(, pthread) free_threadq;
72 LIST_HEAD(thread_hash_head, pthread);
77 static void thr_destroy(struct pthread *curthread, struct pthread *thread);
99 _thr_gc(struct pthread *curthread) in _thr_gc()
101 struct pthread *td, *td_next; in _thr_gc()
102 TAILQ_HEAD(, pthread) worklist; in _thr_gc()
134 struct pthread *
135 _thr_alloc(struct pthread *curthread) in _thr_alloc()
137 struct pthread *thread = NULL; in _thr_alloc()
156 thread = calloc(1, sizeof(struct pthread)); in _thr_alloc()
169 __rangeof(struct pthread, _pthread_startzero, _pthread_endzero)); in _thr_alloc()
189 _thr_free(struct pthread *curthread, struct pthread *thread) in _thr_free()
222 thr_destroy(struct pthread *curthread __unused, struct pthread *thread) in thr_destroy()
236 _thr_link(struct pthread *curthread, struct pthread *thread) in _thr_link()
248 _thr_unlink(struct pthread *curthread, struct pthread *thread) in _thr_unlink()
257 _thr_hash_add(struct pthread *thread) in _thr_hash_add()
266 _thr_hash_remove(struct pthread *thread) in _thr_hash_remove()
271 struct pthread *
272 _thr_hash_find(struct pthread *thread) in _thr_hash_find()
274 struct pthread *td; in _thr_hash_find()
291 _thr_ref_add(struct pthread *curthread, struct pthread *thread, in _thr_ref_add()
311 _thr_ref_delete(struct pthread *curthread, struct pthread *thread) in _thr_ref_delete()
321 _thr_try_gc(struct pthread *curthread, struct pthread *thread) in _thr_try_gc()
342 _thr_find_thread(struct pthread *curthread, struct pthread *thread, in _thr_find_thread()
345 struct pthread *pthread; in _thr_find_thread() local
353 pthread = _thr_hash_find(thread); in _thr_find_thread()
354 if (pthread) { in _thr_find_thread()
355 THR_THREAD_LOCK(curthread, pthread); in _thr_find_thread()
356 if (include_dead == 0 && pthread->state == PS_DEAD) { in _thr_find_thread()
357 THR_THREAD_UNLOCK(curthread, pthread); in _thr_find_thread()
382 struct pthread *curthread, *thrd; in __pthread_distribute_static_tls()