mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
notifier: event notifier implementation
event notifiers are slightly generalized eventfd descriptors. Current implementation depends on eventfd because vhost is the only user, and vhost depends on eventfd anyway, but a stub is provided for non-eventfd case. We'll be able to further generalize this when another user comes along and we see how to best do this. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
ca82180603
commit
2292b33986
4 changed files with 80 additions and 0 deletions
16
hw/event_notifier.h
Normal file
16
hw/event_notifier.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
#ifndef QEMU_EVENT_NOTIFIER_H
|
||||
#define QEMU_EVENT_NOTIFIER_H
|
||||
|
||||
#include "qemu-common.h"
|
||||
|
||||
struct EventNotifier {
|
||||
int fd;
|
||||
};
|
||||
|
||||
int event_notifier_init(EventNotifier *, int active);
|
||||
void event_notifier_cleanup(EventNotifier *);
|
||||
int event_notifier_get_fd(EventNotifier *);
|
||||
int event_notifier_test_and_clear(EventNotifier *);
|
||||
int event_notifier_test(EventNotifier *);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue