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