gallium/util: replace pipe_thread_wait() with thrd_join()

Replace done using:
find ./src -type f -exec sed -i -- \
's:pipe_thread_wait(\([^)]*\)):thrd_join(\1, NULL):g' {} \;

Reviewed-by: Plamena Manolova <plamena.manolova@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Timothy Arceri 2017-03-06 11:58:27 +11:00
parent da40ac65c7
commit d82d8be614
8 changed files with 7 additions and 12 deletions

View File

@ -68,11 +68,6 @@ static inline thrd_t pipe_thread_create(int (*routine)(void *), void *param)
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 );

View File

@ -272,7 +272,7 @@ util_queue_killall_and_wait(struct util_queue *queue)
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;
}

View File

@ -597,7 +597,7 @@ dd_context_destroy(struct pipe_context *_pipe)
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);
}

View File

@ -956,7 +956,7 @@ void lp_rast_destroy( struct lp_rasterizer *rast )
#ifdef _WIN32
pipe_semaphore_wait(&rast->tasks[i].work_done);
#else
pipe_thread_wait(rast->threads[i]);
thrd_join(rast->threads[i], NULL);
#endif
}

View File

@ -170,7 +170,7 @@ void r600_gpu_load_kill_thread(struct r600_common_screen *rscreen)
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;
}

View File

@ -869,7 +869,7 @@ rbug_stop(struct rbug_rbug *tr_rbug)
return;
tr_rbug->running = false;
pipe_thread_wait(tr_rbug->thread);
thrd_join(tr_rbug->thread, NULL);
FREE(tr_rbug);

View File

@ -238,7 +238,7 @@ nine_csmt_destroy( struct NineDevice9 *device, struct csmt_context *ctx )
FREE(ctx);
pipe_thread_wait(render_thread);
thrd_join(render_thread, NULL);
}
static void

View File

@ -117,7 +117,7 @@ int main(int argc, char *argv[])
}
for (i = 0; i < NUM_THREADS; i++ ) {
pipe_thread_wait(threads[i]);
thrd_join(threads[i], NULL);
}
CHECK(p_atomic_read(&proceeded) == NUM_THREADS);