Revision 3b6304f7
b/sysemu.h | ||
---|---|---|
8 | 8 |
#include "qemu-timer.h" |
9 | 9 |
#include "qdict.h" |
10 | 10 |
#include "qerror.h" |
11 |
#include "notify.h" |
|
11 | 12 |
|
12 | 13 |
#ifdef _WIN32 |
13 | 14 |
#include <windows.h> |
... | ... | |
73 | 74 |
void qemu_savevm_state_cancel(Monitor *mon, QEMUFile *f); |
74 | 75 |
int qemu_loadvm_state(QEMUFile *f); |
75 | 76 |
|
77 |
void exit_notifier_add(Notifier *notifier); |
|
78 |
void exit_notifier_remove(Notifier *notifier); |
|
79 |
|
|
80 |
|
|
76 | 81 |
#ifdef _WIN32 |
77 | 82 |
/* Polling handling */ |
78 | 83 |
|
b/vl.c | ||
---|---|---|
150 | 150 |
#include "qemu-option.h" |
151 | 151 |
#include "qemu-config.h" |
152 | 152 |
#include "qemu-objects.h" |
153 |
#include "notify.h" |
|
153 | 154 |
|
154 | 155 |
#include "disas.h" |
155 | 156 |
|
... | ... | |
553 | 554 |
} |
554 | 555 |
#endif |
555 | 556 |
|
557 |
/*********************/ |
|
558 |
/* Exit notifiers */ |
|
559 |
/*********************/ |
|
560 |
|
|
561 |
static NotifierList exit_notifiers = NOTIFIER_LIST_INITIALIZER(exit_notifiers); |
|
562 |
|
|
563 |
void exit_notifier_add(Notifier *notifier) |
|
564 |
{ |
|
565 |
notifier_list_add(&exit_notifiers, notifier); |
|
566 |
} |
|
567 |
|
|
568 |
void exit_notifier_remove(Notifier *notifier) |
|
569 |
{ |
|
570 |
notifier_list_remove(&exit_notifiers, notifier); |
|
571 |
} |
|
572 |
|
|
573 |
static void exit_notifier_notify(void) |
|
574 |
{ |
|
575 |
notifier_list_notify(&exit_notifiers); |
|
576 |
} |
|
577 |
|
|
578 |
static void exit_notifier_init(void) |
|
579 |
{ |
|
580 |
atexit(exit_notifier_notify); |
|
581 |
} |
|
582 |
|
|
556 | 583 |
/***********************************************************/ |
557 | 584 |
/* Bluetooth support */ |
558 | 585 |
static int nb_hcis; |
Also available in: Unified diff