event_notifier: add event_notifier_init_fd
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
ebe7acea53
commit
e80c262be7
|
@ -10,11 +10,18 @@
|
||||||
* See the COPYING file in the top-level directory.
|
* See the COPYING file in the top-level directory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "qemu-common.h"
|
||||||
#include "event_notifier.h"
|
#include "event_notifier.h"
|
||||||
|
|
||||||
#ifdef CONFIG_EVENTFD
|
#ifdef CONFIG_EVENTFD
|
||||||
#include <sys/eventfd.h>
|
#include <sys/eventfd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void event_notifier_init_fd(EventNotifier *e, int fd)
|
||||||
|
{
|
||||||
|
e->fd = fd;
|
||||||
|
}
|
||||||
|
|
||||||
int event_notifier_init(EventNotifier *e, int active)
|
int event_notifier_init(EventNotifier *e, int active)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_EVENTFD
|
#ifdef CONFIG_EVENTFD
|
||||||
|
|
|
@ -19,6 +19,7 @@ struct EventNotifier {
|
||||||
int fd;
|
int fd;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void event_notifier_init_fd(EventNotifier *, int fd);
|
||||||
int event_notifier_init(EventNotifier *, int active);
|
int event_notifier_init(EventNotifier *, int active);
|
||||||
void event_notifier_cleanup(EventNotifier *);
|
void event_notifier_cleanup(EventNotifier *);
|
||||||
int event_notifier_get_fd(EventNotifier *);
|
int event_notifier_get_fd(EventNotifier *);
|
||||||
|
|
Loading…
Reference in New Issue