Mesa (master): st/nine: clean up thead shutdown sequence a bit
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Nov 9 21:37:50 UTC 2018
Module: Mesa
Branch: master
Commit: 414470854d40934f90f4ed12dc3a687d187d4770
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=414470854d40934f90f4ed12dc3a687d187d4770
Author: Andre Heider <a.heider at gmail.com>
Date: Tue Nov 6 09:27:14 2018 +0100
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 <a.heider at gmail.com>
Reviewed-by: Axel Davy <davyaxel0 at gmail.com>
---
src/gallium/state_trackers/nine/threadpool.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/gallium/state_trackers/nine/threadpool.c b/src/gallium/state_trackers/nine/threadpool.c
index 19721aab2d..3ce6cd5752 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
More information about the mesa-commit
mailing list