From: Jan Kiszka <jan.kiszka@siemens.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org, alex@alex.org.uk, rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH 1/3] qemu-timer: drop outdated signal safety comments
Date: Fri, 05 Jul 2013 19:52:20 +0200 [thread overview]
Message-ID: <51D707D4.5090906@siemens.com> (raw)
In-Reply-To: <1373027986-17868-2-git-send-email-stefanha@redhat.com>
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 <stefanha@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.kiszka@siemens.com>
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2013-07-05 18:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-05 12:39 [Qemu-devel] [PATCH 0/3] qemu-timer: make QEMUTimer functions thread-safe Stefan Hajnoczi
2013-07-05 12:39 ` [Qemu-devel] [PATCH 1/3] qemu-timer: drop outdated signal safety comments Stefan Hajnoczi
2013-07-05 17:52 ` Jan Kiszka [this message]
2013-07-05 12:39 ` [Qemu-devel] [PATCH 2/3] qemu-timer: add QEMUClock->active_timers list lock Stefan Hajnoczi
2013-07-05 13:01 ` Paolo Bonzini
2013-07-05 12:39 ` [Qemu-devel] [PATCH 3/3] qemu-timer: add qemu_alarm_timer->timer_modified_lock Stefan Hajnoczi
2013-07-05 17:51 ` [Qemu-devel] [PATCH 0/3] qemu-timer: make QEMUTimer functions thread-safe Jan Kiszka
2013-07-15 12:45 ` Paolo Bonzini
2013-07-15 12:57 ` Jan Kiszka
2013-07-15 13:38 ` Paolo Bonzini
2013-07-18 4:00 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51D707D4.5090906@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=alex@alex.org.uk \
--cc=aliguori@us.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).