Hi On Thu, Feb 4, 2016 at 4:25 PM, Frediano Ziglio <fziglio@xxxxxxxxxx> wrote: > Here you can have a race condition. > If red_dispatcher_async_complete wake up the Qemu thread before reset > gl_draw_async it could be possible Qemu will try to send another draw > finding gl_draw_async not NULL and returning without doing nothing > Just save on an automatic variable, set to NULL and call complete > function I suppose that's what you mean: if (num == 0) { - red_dispatcher_async_complete(qxl->st->dispatcher, qxl->st->gl_draw_async); + struct AsyncCommand *async = qxl->st->gl_draw_async; qxl->st->gl_draw_async = NULL; + red_dispatcher_async_complete(qxl->st->dispatcher, async); } -- Marc-André Lureau _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel