[Spice-commits] server/red_worker.c
Izik Eidus
izik at kemper.freedesktop.org
Fri Apr 9 12:41:01 PDT 2010
server/red_worker.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 03fb4e05be48fb47ff38b100e649f9aa263ceb58
Author: Izik Eidus <ieidus at redhat.com>
Date: Fri Apr 9 22:47:03 2010 +0300
take the right lock when freeing glz stuff of surfaces
this was noticed by Yonit.
Signed-off-by: Izik Eidus <ieidus at redhat.com>
diff --git a/server/red_worker.c b/server/red_worker.c
index 4078145..6f72419 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -1799,14 +1799,14 @@ static void red_clear_surface_glz_drawables(RedWorker *worker, int surface_id)
return;
}
- pthread_mutex_lock(&worker->display_channel->glz_drawables_inst_to_free_lock);
+ pthread_rwlock_wrlock(&worker->display_channel->glz_dict->encode_lock);
while ((ring_item = ring_get_head(&worker->surfaces[surface_id].glz_drawables))) {
RedGlzDrawable *now = SPICE_CONTAINEROF(ring_item, RedGlzDrawable, surface_link);
red_display_free_glz_drawable(worker->display_channel, now);
}
- pthread_mutex_unlock(&worker->display_channel->glz_drawables_inst_to_free_lock);
+ pthread_rwlock_unlock(&worker->display_channel->glz_dict->encode_lock);
}
static void red_clear_surface_drawables_from_pipe(RedWorker *worker, int surface_id)
More information about the Spice-commits
mailing list