summaryrefslogtreecommitdiff
path: root/tap-win32.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-06-25 17:18:27 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-06-25 17:18:27 +0000
commita18e524af0c23b083dc69f9a2eed563893d01f22 (patch)
treefbafaaf82a481fee0300a98194f5fa4d1369c76a /tap-win32.c
parente15d737181c9e7da2274ca62a3f4f28b7a5cbeb7 (diff)
downloadqemu-a18e524af0c23b083dc69f9a2eed563893d01f22.tar.gz
multiple wait object support for win32 (kazu)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2013 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'tap-win32.c')
-rw-r--r--tap-win32.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tap-win32.c b/tap-win32.c
index b6056955c0..af5e25e683 100644
--- a/tap-win32.c
+++ b/tap-win32.c
@@ -630,6 +630,7 @@ static int tap_win32_open(tap_win32_overlapped_t **phandle,
typedef struct TAPState {
VLANClientState *vc;
tap_win32_overlapped_t *handle;
+ HANDLE tap_event;
} TAPState;
static TAPState *tap_win32_state = NULL;
@@ -656,6 +657,7 @@ void tap_win32_poll(void)
if (size > 0) {
qemu_send_packet(s->vc, buf, size);
tap_win32_free_buffer(s->handle, buf);
+ SetEvent(s->tap_event);
}
}
@@ -676,5 +678,11 @@ int tap_win32_init(VLANState *vlan, const char *ifname)
snprintf(s->vc->info_str, sizeof(s->vc->info_str),
"tap: ifname=%s", ifname);
tap_win32_state = s;
+
+ s->tap_event = CreateEvent(NULL, FALSE, FALSE, NULL);
+ if (!s->tap_event) {
+ fprintf(stderr, "tap-win32: Failed CreateEvent\n");
+ }
+ qemu_add_wait_object(s->tap_event, NULL, NULL);
return 0;
}