static void thread_fini(void) { ck_stack_entry_t *stack_entry; ph_thread_t *thr; while ((stack_entry = ck_stack_pop_npsc(&ph_thread_all_threads)) != NULL) { thr = ph_thread_from_stack_entry(stack_entry); ph_counter_tear_down_thread(thr); free(thr); } }
static void thread_fini(void) { #ifdef PH_PLACATE_VALGRIND ck_stack_entry_t *stack_entry; ph_thread_t *thr; while ((stack_entry = ck_stack_pop_npsc(&ph_thread_all_threads)) != NULL) { thr = ph_thread_from_stack_entry(stack_entry); ph_counter_tear_down_thread(thr); free(thr); } #endif }