[Spice-devel] [Spice-commits] 2 commits - server/reds.c server/red_worker.c

Yonit Halperin yhalperi at redhat.com
Wed Apr 7 06:52:38 PDT 2010


>
> +static void red_clear_surface_glz_drawables(RedWorker *worker, int surface_id)
> +{
> +    RingItem *ring_item;
> +
> +    if (!worker->display_channel) {
> +        return;
> +    }
> +
> +    pthread_mutex_lock(&worker->display_channel->glz_drawables_inst_to_free_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);
> +}
> +

Wrong lock, you should use glz_dict->encode_lock.

Yonit.


More information about the Spice-devel mailing list