qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 2/2] add qemu_unregister_wakeup_notifier
@ 2012-03-07  8:52 Gerd Hoffmann
  2012-03-07  9:14 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Gerd Hoffmann @ 2012-03-07  8:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

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;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-07  9:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).