Re: [PATCH v3 8/9] Handle GL_DRAW messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> 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);
>      }
> 
> 

Yes, exactly

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]