qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC] [PATCHv8 11/30] aio / timers: Add a notify callba


From: Alex Bligh
Subject: Re: [Qemu-devel] [RFC] [PATCHv8 11/30] aio / timers: Add a notify callback to QEMUTimerList
Date: Fri, 9 Aug 2013 15:16:50 +0100

On 9 Aug 2013, at 10:02, Stefan Hajnoczi wrote:

> When looking at thread-safety I had to think about set_notify_cb() for a
> while.  The issue is that we add the timerlist to the clock source's
> ->timerlists *before* notify_cb has been assigned.
> 
> This could be a problem is another thread re-enables the clock source
> while we are still in timerlist_new().
> 
> In practice it is not an issue when AioContexts are created under the
> global mutex (that's the case today).
> 
> Still, it would be a little safer to drop set_notify_cb() and instead
> pass in cb/opaque in timerlist_new().

This is good idea. I will do that.

-- 
Alex Bligh







reply via email to

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