]> Git Repo - qemu.git/blame - include/qemu/event_notifier.h
Merge remote-tracking branch 'remotes/palmer/tags/riscv-for-master-4.1-sf0' into...
[qemu.git] / include / qemu / event_notifier.h
CommitLineData
6b620ca3
PB
1/*
2 * event notifier support
3 *
4 * Copyright Red Hat, Inc. 2010
5 *
6 * Authors:
7 * Michael S. Tsirkin <[email protected]>
8 *
9 * This work is licensed under the terms of the GNU GPL, version 2 or later.
10 * See the COPYING file in the top-level directory.
11 */
12
2292b339
MT
13#ifndef QEMU_EVENT_NOTIFIER_H
14#define QEMU_EVENT_NOTIFIER_H
15
16#include "qemu-common.h"
17
fc97a652
PB
18#ifdef _WIN32
19#include <windows.h>
20#endif
21
2292b339 22struct EventNotifier {
fc97a652
PB
23#ifdef _WIN32
24 HANDLE event;
25#else
d0cc2fbf
PB
26 int rfd;
27 int wfd;
fc97a652 28#endif
2292b339
MT
29};
30
6bf819f0
PB
31typedef void EventNotifierHandler(EventNotifier *);
32
2292b339
MT
33int event_notifier_init(EventNotifier *, int active);
34void event_notifier_cleanup(EventNotifier *);
2ec10b95 35int event_notifier_set(EventNotifier *);
2292b339 36int event_notifier_test_and_clear(EventNotifier *);
2292b339 37
fc97a652
PB
38#ifdef CONFIG_POSIX
39void event_notifier_init_fd(EventNotifier *, int fd);
12f0b68c 40int event_notifier_get_fd(const EventNotifier *);
fc97a652
PB
41#else
42HANDLE event_notifier_get_handle(EventNotifier *);
43#endif
44
2292b339 45#endif
This page took 0.484357 seconds and 4 git commands to generate.