summaryrefslogtreecommitdiff
path: root/notify.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-01-13 17:34:01 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2012-02-17 08:33:32 -0600
commit31552529a7eba5011dac74bab18a852860c45c9d (patch)
treedda9b8146324b71445dd563530670e6b4da8c5e4 /notify.h
parentc77de088b1067fc0e0df322e5bac60a3a26a0613 (diff)
downloadqemu-31552529a7eba5011dac74bab18a852860c45c9d.tar.gz
notifier: switch to QLIST
Notifiers do not need to access both ends of the list, and using a QLIST also simplifies the API. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'notify.h')
-rw-r--r--notify.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/notify.h b/notify.h
index 54fc57cec1..03cf26c0b6 100644
--- a/notify.h
+++ b/notify.h
@@ -21,22 +21,22 @@ typedef struct Notifier Notifier;
struct Notifier
{
void (*notify)(Notifier *notifier, void *data);
- QTAILQ_ENTRY(Notifier) node;
+ QLIST_ENTRY(Notifier) node;
};
typedef struct NotifierList
{
- QTAILQ_HEAD(, Notifier) notifiers;
+ QLIST_HEAD(, Notifier) notifiers;
} NotifierList;
#define NOTIFIER_LIST_INITIALIZER(head) \
- { QTAILQ_HEAD_INITIALIZER((head).notifiers) }
+ { QLIST_HEAD_INITIALIZER((head).notifiers) }
void notifier_list_init(NotifierList *list);
void notifier_list_add(NotifierList *list, Notifier *notifier);
-void notifier_list_remove(NotifierList *list, Notifier *notifier);
+void notifier_remove(Notifier *notifier);
void notifier_list_notify(NotifierList *list, void *data);