From d63b7d9c777829cb801df8c7c02a3d6210c1faea Mon Sep 17 00:00:00 2001 From: Patrick Collins Date: Mon, 22 Feb 2016 17:07:49 -0800 Subject: [PATCH] lkl: Check for POLLPRI in POSIX net_poll Strictly speaking, POSIX.1-2008 in the poll.h entry says: POLLIN Data other than high priority data may be read without blocking POLLPRI Priority data may be read without blocking So to check that we can read(2) without blocking, we should check for POLLPRI in addition to POLLIN. Signed-off-by: Patrick Collins --- tools/lkl/lib/posix-host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lkl/lib/posix-host.c b/tools/lkl/lib/posix-host.c index b493b44b4b15d9..c92e76182ef03d 100644 --- a/tools/lkl/lib/posix-host.c +++ b/tools/lkl/lib/posix-host.c @@ -304,7 +304,7 @@ static int net_poll(union lkl_netdev nd, int events) int ret = 0; if (events & LKL_DEV_NET_POLL_RX) - pfd.events |= POLLIN; + pfd.events |= POLLIN | POLLPRI; if (events & LKL_DEV_NET_POLL_TX) pfd.events |= POLLOUT;