mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-30 06:50:57 +00:00
6bf819f0a2
Win32 event notifiers are not file descriptors, so they will not be able to use qemu_set_fd_handler. But even if for now we only have a POSIX version of EventNotifier, we can add a specific function that wraps the call. The wrapper passes the EventNotifier as the opaque value so that it will be used with container_of. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
33 lines
807 B
C
33 lines
807 B
C
/*
|
|
* event notifier support
|
|
*
|
|
* Copyright Red Hat, Inc. 2010
|
|
*
|
|
* Authors:
|
|
* Michael S. Tsirkin <mst@redhat.com>
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
* See the COPYING file in the top-level directory.
|
|
*/
|
|
|
|
#ifndef QEMU_EVENT_NOTIFIER_H
|
|
#define QEMU_EVENT_NOTIFIER_H
|
|
|
|
#include "qemu-common.h"
|
|
|
|
struct EventNotifier {
|
|
int fd;
|
|
};
|
|
|
|
typedef void EventNotifierHandler(EventNotifier *);
|
|
|
|
void event_notifier_init_fd(EventNotifier *, int fd);
|
|
int event_notifier_init(EventNotifier *, int active);
|
|
void event_notifier_cleanup(EventNotifier *);
|
|
int event_notifier_get_fd(EventNotifier *);
|
|
int event_notifier_set(EventNotifier *);
|
|
int event_notifier_test_and_clear(EventNotifier *);
|
|
int event_notifier_set_handler(EventNotifier *, EventNotifierHandler *);
|
|
|
|
#endif
|