X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=notify.c;h=12282a6745c5daba71d9caa8e0ac293ddb023809;hb=f0536bb848ad6eb2709a7dc675f261bd160c751b;hp=bcd3fc532f9b32ca27b5e4d087391c248cefc529;hpb=d1e70c5e6d1472856c52969301247fe8c3c8389d;p=mirror_qemu.git diff --git a/notify.c b/notify.c index bcd3fc532f..12282a6745 100644 --- a/notify.c +++ b/notify.c @@ -9,6 +9,8 @@ * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. * + * Contributions after 2012-01-13 are licensed under the terms of the + * GNU GPL, version 2 or (at your option) any later version. */ #include "qemu-common.h" @@ -16,24 +18,24 @@ void notifier_list_init(NotifierList *list) { - QTAILQ_INIT(&list->notifiers); + QLIST_INIT(&list->notifiers); } void notifier_list_add(NotifierList *list, Notifier *notifier) { - QTAILQ_INSERT_HEAD(&list->notifiers, notifier, node); + QLIST_INSERT_HEAD(&list->notifiers, notifier, node); } -void notifier_list_remove(NotifierList *list, Notifier *notifier) +void notifier_remove(Notifier *notifier) { - QTAILQ_REMOVE(&list->notifiers, notifier, node); + QLIST_REMOVE(notifier, node); } -void notifier_list_notify(NotifierList *list) +void notifier_list_notify(NotifierList *list, void *data) { Notifier *notifier, *next; - QTAILQ_FOREACH_SAFE(notifier, &list->notifiers, node, next) { - notifier->notify(notifier); + QLIST_FOREACH_SAFE(notifier, &list->notifiers, node, next) { + notifier->notify(notifier, data); } }