From fe7c152631ea184e6690764ad54c1b304ba08402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Wed, 7 May 2014 22:48:56 +0200 Subject: [PATCH] Use nonblocking pipes --- src/iomux_waker.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/iomux_waker.c b/src/iomux_waker.c index a7c517b..972b8ab 100644 --- a/src/iomux_waker.c +++ b/src/iomux_waker.c @@ -3,6 +3,7 @@ #include #include #include "ucore/iomux_waker.h" +#include "ucore/fd_utils.h" static void uc_waker_pipe_cb(struct IOMux *mux, struct IOMuxFD *fd, unsigned int event) { @@ -64,6 +65,10 @@ int uc_iomux_waker_init(struct IOMux *mux, struct IOMuxWaker *wk, uc_waker_cb cb wk->mux = mux; wk->wake_cb = cb; wk->signaller.fd = pfds[1]; + rc = uc_set_nonblocking(pfds[0]); + assert(rc == 0); + rc = uc_set_nonblocking(pfds[1]); + assert(rc == 0); if (uc_install_wake_handler(wk, pfds[0]) == 0) { return 0;