reactor: fix io_setup() failure

_io_context must be set to 0, otherwise io_setup fails with -EINVAL.

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
This commit is contained in:
Tomasz Grabiec
2014-08-27 13:28:23 +02:00
committed by Avi Kivity
parent 462a285dc1
commit 34667e8dfe

View File

@@ -35,6 +35,7 @@ reactor::reactor()
: _epollfd(epoll_create1(EPOLL_CLOEXEC))
, _io_eventfd(eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK))
, _io_eventfd_state(_io_eventfd)
, _io_context(0)
, _io_context_available(max_aio) {
assert(_epollfd != -1);
assert(_io_eventfd != -1);