aboutsummaryrefslogtreecommitdiff
path: root/sysemu.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-06-04 14:08:07 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2010-06-14 15:46:28 -0500
commitfd42deeb4cb42f90084046e3ebdb4383953195e3 (patch)
tree671123e5db9674ce1950cd972c42b39da1408c71 /sysemu.h
parent4cf3e6f3d85492f20a773dd6c9068ab89ba24a18 (diff)
downloadqemu-fd42deeb4cb42f90084046e3ebdb4383953195e3.zip
qemu-fd42deeb4cb42f90084046e3ebdb4383953195e3.tar.gz
qemu-fd42deeb4cb42f90084046e3ebdb4383953195e3.tar.bz2
Add exit notifiers.
Hook up any cleanup work which needs to be done here. Advantages over using atexit(3): (1) You get passed in a pointer to the notifier. If you embed that into your state struct you can use container_of() to get get your state info. (2) You can unregister, say when un-plugging a device. [ v2: move code out of #ifndef _WIN32 ] Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'sysemu.h')
-rw-r--r--sysemu.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sysemu.h b/sysemu.h
index fbe103b..c758243 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -6,6 +6,7 @@
#include "qemu-option.h"
#include "qemu-queue.h"
#include "qemu-timer.h"
+#include "notify.h"
#ifdef _WIN32
#include <windows.h>
@@ -56,6 +57,9 @@ int qemu_powerdown_requested(void);
extern qemu_irq qemu_system_powerdown;
void qemu_system_reset(void);
+void qemu_add_exit_notifier(Notifier *notify);
+void qemu_remove_exit_notifier(Notifier *notify);
+
void do_savevm(Monitor *mon, const QDict *qdict);
int load_vmstate(const char *name);
void do_delvm(Monitor *mon, const QDict *qdict);