qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH 2/2] vnc: don't mess up with iohandlers in the v


From: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH 2/2] vnc: don't mess up with iohandlers in the vnc thread
Date: Thu, 10 Mar 2011 14:58:21 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

On 03/10/2011 02:54 PM, Corentin Chary wrote:
> >  You can use a bottom half for this instead of a special socket. Signaling
> >  a bottom half is async-signal- and thread-safe.
>
>  Bottom halves are thread safe?
>
>  I don't think so.

The bottom halves API is not thread safe, but calling
qemu_bh_schedule_idle()

Not _idle please.

in another thread *seems* to be safe (here, it
would be protected from qemu_bh_delete() by vnc_lock_output()).

If it weren't protected against qemu_bh_delete, you would have already the same race between writing to the socket and closing it in another thread.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]