Il 25/07/2013 11:37, Alex Bligh ha scritto: > Stefan, > >> This should be one of the last patches so qemu.git remains bisectable. >> Only remove the alarm timer once the event loops are already using the >> timeout argument. > > OK > >>> @@ -245,11 +82,7 @@ static QEMUClock *qemu_new_clock(int type) >>> >>> void qemu_clock_enable(QEMUClock *clock, bool enabled) >>> { >>> - bool old = clock->enabled; >>> clock->enabled = enabled; >>> - if (enabled && !old) { >>> - qemu_rearm_alarm_timer(alarm_timer); >>> - } >> >> If this function is supposed to work when called from another thread >> (e.g. vcpu thread), then you need to call qemu_notify_event(). For >> AioContext clocks that should be aio_notify() with the relevant >> AioContext, but we don't need that yet. > > Each AioContext knows which clock it has but each clock doesn't know if > it's part of an AioContext. I suggest this is infrequent enough that always > using qemu_notify_event() would be OK. That should interrupt any poll.
No, qemu_notify_event() only interrupts the main clock's poll. Paolo