return thread;
}
-static inline int pipe_thread_wait( thrd_t thread )
-{
- return thrd_join( thread, NULL );
-}
-
static inline int pipe_thread_destroy( thrd_t thread )
{
return thrd_detach( thread );
mtx_unlock(&queue->lock);
for (i = 0; i < queue->num_threads; i++)
- pipe_thread_wait(queue->threads[i]);
+ thrd_join(queue->threads[i], NULL);
queue->num_threads = 0;
}
mtx_lock(&dctx->mutex);
dctx->kill_thread = 1;
mtx_unlock(&dctx->mutex);
- pipe_thread_wait(dctx->thread);
+ thrd_join(dctx->thread, NULL);
mtx_destroy(&dctx->mutex);
assert(!dctx->records);
}
#ifdef _WIN32
pipe_semaphore_wait(&rast->tasks[i].work_done);
#else
- pipe_thread_wait(rast->threads[i]);
+ thrd_join(rast->threads[i], NULL);
#endif
}
return;
p_atomic_inc(&rscreen->gpu_load_stop_thread);
- pipe_thread_wait(rscreen->gpu_load_thread);
+ thrd_join(rscreen->gpu_load_thread, NULL);
rscreen->gpu_load_thread = 0;
}
return;
tr_rbug->running = false;
- pipe_thread_wait(tr_rbug->thread);
+ thrd_join(tr_rbug->thread, NULL);
FREE(tr_rbug);
FREE(ctx);
- pipe_thread_wait(render_thread);
+ thrd_join(render_thread, NULL);
}
static void
}
for (i = 0; i < NUM_THREADS; i++ ) {
- pipe_thread_wait(threads[i]);
+ thrd_join(threads[i], NULL);
}
CHECK(p_atomic_read(&proceeded) == NUM_THREADS);