Re: [Qemu-devel] [PATCH 02/17] event_notifier: enable it to use pipes

2012-10-08 Thread Stefan Hajnoczi
On Tue, Sep 25, 2012 at 02:55:48PM +0200, Paolo Bonzini wrote: > int event_notifier_init(EventNotifier *e, int active) > { > +int fds[2]; > +int ret; > + > #ifdef CONFIG_EVENTFD > -int fd = eventfd(!!active, EFD_NONBLOCK | EFD_CLOEXEC); > -if (fd < 0) > -return -errno; >

[Qemu-devel] [PATCH 02/17] event_notifier: enable it to use pipes

2012-09-25 Thread Paolo Bonzini
This takes the eventfd emulation code from the main loop. When the EventNotifier is used for the main loop too, we need this compatibility code. Without CONFIG_EVENTFD, event_notifier_get_fd is only usable for the "read" side of the notifier, for example to set a select() handler. Reviewed-by: A