diff options
author | Andre Heider <[email protected]> | 2018-11-06 09:27:14 +0100 |
---|---|---|
committer | Axel Davy <[email protected]> | 2018-11-09 22:37:27 +0100 |
commit | 414470854d40934f90f4ed12dc3a687d187d4770 (patch) | |
tree | ec2fa1f479c804fe80923bcf104b9cb51a3d26ed /src/gallium/state_trackers | |
parent | 123bf9cbe7ef2a44072b5e28c7e6a210814ad3f5 (diff) |
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 <[email protected]>
Reviewed-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/nine/threadpool.c | 6 |
1 files changed, 2 insertions, 4 deletions
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 |