[Spice-devel] [PATCH] monitor: Protect outbuf from concurrent access

Gerd Hoffmann kraxel at redhat.com
Mon Sep 5 00:48:04 PDT 2011


On 09/02/11 17:31, Paolo Bonzini wrote:
> On 09/02/2011 05:18 PM, Gerd Hoffmann wrote:
>>
>>> Can you just use a bottom half to defer this work to the I/O thread?
>>> Bottom half scheduling has to be signal safe which means it will also be
>>> thread safe.
>>
>> Not that straight forward as I would have to pass arguments to the
>> bottom half.
>
> Can you add a variant of qemu_bh_new that accepts a sizeof for the new
> bottom half? Then the bottom half itself can be passed as the opaque and
> used for the arguments.

That wouldn't help.  I would have to create some kind of job queue which 
is then processed by the bottom half.

cheers,
   Gerd



More information about the Spice-devel mailing list