From: Andre Heider Date: Tue, 6 Nov 2018 08:27:14 +0000 (+0100) Subject: st/nine: clean up thead shutdown sequence a bit X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=414470854d40934f90f4ed12dc3a687d187d4770;p=mesa.git st/nine: clean up thead shutdown sequence a bit Just break out of the loop instead, it does the same thing. Signed-off-by: Andre Heider Reviewed-by: Axel Davy --- diff --git a/src/gallium/state_trackers/nine/threadpool.c b/src/gallium/state_trackers/nine/threadpool.c index 19721aab2dd..3ce6cd57524 100644 --- a/src/gallium/state_trackers/nine/threadpool.c +++ b/src/gallium/state_trackers/nine/threadpool.c @@ -52,10 +52,8 @@ threadpool_worker(void *data) while (!pool->workqueue && !pool->shutdown) pthread_cond_wait(&pool->new_work, &pool->m); - if (pool->shutdown) { - pthread_mutex_unlock(&pool->m); - return NULL; - } + if (pool->shutdown) + break; /* Pull the first task from the list. We don't free it -- it now lacks * a reference other than the worker creator's, whose responsibility it