slirp: Replace u_int8_t, u_int16_t, u_int32_t, u_int64_t by standard int types
[qemu.git] / notify.h
blobb40522f582de8366aed0fa1e417a6cfa78eb15cb
1 /*
2 * Notifier lists
4 * Copyright IBM, Corp. 2010
6 * Authors:
7 * Anthony Liguori <aliguori@us.ibm.com>
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
14 #ifndef QEMU_NOTIFY_H
15 #define QEMU_NOTIFY_H
17 #include "qemu-queue.h"
19 typedef struct Notifier Notifier;
21 struct Notifier
23 void (*notify)(Notifier *notifier);
24 QTAILQ_ENTRY(Notifier) node;
27 typedef struct NotifierList
29 QTAILQ_HEAD(, Notifier) notifiers;
30 } NotifierList;
32 #define NOTIFIER_LIST_INITIALIZER(head) \
33 { QTAILQ_HEAD_INITIALIZER((head).notifiers) }
35 void notifier_list_init(NotifierList *list);
37 void notifier_list_add(NotifierList *list, Notifier *notifier);
39 void notifier_list_remove(NotifierList *list, Notifier *notifier);
41 void notifier_list_notify(NotifierList *list);
43 #endif