On 2013-07-05 14:39, Stefan Hajnoczi wrote: > host_alarm_handler() may be invoked as a signal handler. Previously we > did more processing in the signal handler and therefore needed > signal-safe timer code.
Signal handlers run in the context of the signal processing thread, i.e. the iothread so far. > > Today host_alarm_handler() just marks the alarm timer as expired/pending > and notifies the main loop using qemu_notify_event(). > > Therefore these outdated comments about signal safety can be dropped. > > Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> > --- > qemu-timer.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/qemu-timer.c b/qemu-timer.c > index b2d95e2..4740da9 100644 > --- a/qemu-timer.c > +++ b/qemu-timer.c > @@ -300,8 +300,6 @@ void qemu_del_timer(QEMUTimer *ts) > { > QEMUTimer **pt, *t; > > - /* NOTE: this code must be signal safe because > - qemu_timer_expired() can be called from a signal. */ > pt = &ts->clock->active_timers; > for(;;) { > t = *pt; > @@ -324,8 +322,6 @@ void qemu_mod_timer_ns(QEMUTimer *ts, int64_t expire_time) > qemu_del_timer(ts); > > /* add the timer in the sorted list */ > - /* NOTE: this code must be signal safe because > - qemu_timer_expired() can be called from a signal. */ > pt = &ts->clock->active_timers; > for(;;) { > t = *pt; > If you fix the imprecision in the log: Reviewed-by: Jan Kiszka <jan.kis...@siemens.com> Jan -- Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux