Skip to content

Commit d63b7d9

Browse files
committed
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 <[email protected]>
1 parent c5af86e commit d63b7d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/lkl/lib/posix-host.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ static int net_poll(union lkl_netdev nd, int events)
304304
int ret = 0;
305305

306306
if (events & LKL_DEV_NET_POLL_RX)
307-
pfd.events |= POLLIN;
307+
pfd.events |= POLLIN | POLLPRI;
308308
if (events & LKL_DEV_NET_POLL_TX)
309309
pfd.events |= POLLOUT;
310310

0 commit comments

Comments
 (0)