summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorAndre Heider <[email protected]>2018-11-06 09:27:13 +0100
committerAxel Davy <[email protected]>2018-11-09 22:37:27 +0100
commit123bf9cbe7ef2a44072b5e28c7e6a210814ad3f5 (patch)
treedbf1747b9162b26be4e0ba11fc8b203f52cade14 /src/gallium/state_trackers
parent10598c9667a9c5ea04ac8279549b1df8c026ef51 (diff)
st/nine: plug thread related leaks
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/nine_queue.c4
-rw-r--r--src/gallium/state_trackers/nine/nine_state.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/nine_queue.c b/src/gallium/state_trackers/nine/nine_queue.c
index 7a85798f0f4..c09810b1a8a 100644
--- a/src/gallium/state_trackers/nine/nine_queue.c
+++ b/src/gallium/state_trackers/nine/nine_queue.c
@@ -265,8 +265,12 @@ void
nine_queue_delete(struct nine_queue_pool *ctx)
{
unsigned i;
+
mtx_destroy(&ctx->mutex_pop);
+ cnd_destroy(&ctx->event_pop);
+
mtx_destroy(&ctx->mutex_push);
+ cnd_destroy(&ctx->event_push);
for (i = 0; i < NINE_CMD_BUFS; i++)
FREE(ctx->pool[i].mem_pool);
diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c
index 74aaf57a549..273be88e2b8 100644
--- a/src/gallium/state_trackers/nine/nine_state.c
+++ b/src/gallium/state_trackers/nine/nine_state.c
@@ -234,7 +234,12 @@ nine_csmt_destroy( struct NineDevice9 *device, struct csmt_context *ctx )
nine_csmt_wait_processed(ctx);
nine_queue_delete(ctx->pool);
+
+ mtx_destroy(&ctx->thread_resume);
+ mtx_destroy(&ctx->thread_running);
+
mtx_destroy(&ctx->mutex_processed);
+ cnd_destroy(&ctx->event_processed);
FREE(ctx);