search for: event_index

Displaying 4 results from an estimated 4 matches for "event_index".

Did you mean: event_idx
2018 Feb 27
2
tinc 1.1: missing PONG
...WRITE); - continue; + if(event_count > WSA_MAXIMUM_WAIT_EVENTS) { + WSASetLastError(WSA_INVALID_PARAMETER); + return(false); } - WSAEVENT *events = xmalloc(event_count * sizeof(*events)); + WSAEVENT events[WSA_MAXIMUM_WAIT_EVENTS]; + io_t *io_map[WSA_MAXIMUM_WAIT_EVENTS]; DWORD event_index = 0; for splay_each(io_t, io, &io_tree) { events[event_index] = io->event; + io_map[event_index] = io; event_index++; } - DWORD result = WSAWaitForMultipleEvents(event_count, events, FALSE, timeout_ms, FALSE); + /* + * If the generation number changes due to event rem...
2018 Feb 23
2
tinc 1.1: missing PONG
...omly shuffle events[] but that seems needlessly complicated. - todd diff --git a/src/event.c b/src/event.c index 331872a..03111d0 100644 --- a/src/event.c +++ b/src/event.c @@ -403,11 +403,14 @@ bool event_loop(void) { } WSAEVENT *events = xmalloc(event_count * sizeof(*events)); - DWORD event_index = 0; + DWORD event_index = event_count; + /* + * Fill events[] in reverse order. Otherwise we may starve + * events other than the TAP, which is usually at the head. + */ for splay_each(io_t, io, &io_tree) { - events[event_index] = io->event; - event_index++; + events[--e...
2011 Jul 28
10
[RFC PATCH 0/8] virtio: Support for hibernation (S4)
Hello, These patches are an initial attempt at supporting hibernation for virtio drivers. The default configuration of event_index=on doesn't work; i.e. restore from a hibernated image only works if the devices have event_index support turned off. I have not yet dug into this, but is most likely due to some state not being sync'ed. This could be related to the hack that is patch 3. Each virtio driver has to be modif...
2011 Jul 28
10
[RFC PATCH 0/8] virtio: Support for hibernation (S4)
Hello, These patches are an initial attempt at supporting hibernation for virtio drivers. The default configuration of event_index=on doesn't work; i.e. restore from a hibernated image only works if the devices have event_index support turned off. I have not yet dug into this, but is most likely due to some state not being sync'ed. This could be related to the hack that is patch 3. Each virtio driver has to be modif...