All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel <qemu-devel@nongnu.org>, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] add qemu_unregister_wakeup_notifier
Date: Wed, 07 Mar 2012 10:14:20 +0100	[thread overview]
Message-ID: <4F5726EC.60703@redhat.com> (raw)
In-Reply-To: <1331110333-32578-1-git-send-email-kraxel@redhat.com>

Il 07/03/2012 09:52, Gerd Hoffmann ha scritto:
> While being at it complement qemu_register_wakeup_notifier with
> qemu_unregister_wakeup_notifier too.
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  sysemu.h |    1 +
>  vl.c     |    5 +++++
>  2 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/sysemu.h b/sysemu.h
> index ef604aa..031df88 100644
> --- a/sysemu.h
> +++ b/sysemu.h
> @@ -51,6 +51,7 @@ void qemu_unregister_suspend_notifier(Notifier *notifier);
>  void qemu_system_wakeup_request(WakeupReason reason);
>  void qemu_system_wakeup_enable(WakeupReason reason, bool enabled);
>  void qemu_register_wakeup_notifier(Notifier *notifier);
> +void qemu_unregister_wakeup_notifier(Notifier *notifier);
>  void qemu_system_shutdown_request(void);
>  void qemu_system_powerdown_request(void);
>  void qemu_system_debug_request(void);
> diff --git a/vl.c b/vl.c
> index 06658a8..e8c4af1 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -1470,6 +1470,11 @@ void qemu_register_wakeup_notifier(Notifier *notifier)
>      notifier_list_add(&wakeup_notifiers, notifier);
>  }
>  
> +void qemu_unregister_wakeup_notifier(Notifier *notifier)
> +{
> +    notifier_list_remove(&wakeup_notifiers, notifier);
> +}
> +
>  void qemu_system_killed(int signal, pid_t pid)
>  {
>      shutdown_signal = signal;

Upstream has notifier_remove, not notifier_list_remove.  You could just
use it directly instead of adding wrappers.

Paolo

      reply	other threads:[~2012-03-07  9:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-07  8:52 [Qemu-devel] [PATCH 2/2] add qemu_unregister_wakeup_notifier Gerd Hoffmann
2012-03-07  9:14 ` Paolo Bonzini [this message]

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=4F5726EC.60703@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.