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