[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/3] qemu-timer: drop outdated signal safety com
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-devel] [PATCH 1/3] qemu-timer: drop outdated signal safety comments |
Date: |
Fri, 05 Jul 2013 19:52:20 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
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 <address@hidden>
> ---
> 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 <address@hidden>
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux