From fa2056d2cc7cb53ebda9eec5d2fb91fc154a6c4f Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sat, 15 May 2021 21:10:27 -0400 Subject: [PATCH] io_uring::get_cqe: return null if unavailable I'm not sure if we actually need to dinstinguish between null and EAGAIN like liburing does, but I suspect not. In any case, this is sufficient to implement a proof-of-concept for syscall-free I/O. Signed-off-by: Drew DeVault --- io_uring/queue.ha | 3 +-- diff --git a/io_uring/queue.ha b/io_uring/queue.ha index bb1989f5f377e71549abe1aebfecb671834ae4b3..1df8a71d816739eaadbc10ab995622a8400903d7 100644 --- a/io_uring/queue.ha +++ b/io_uring/queue.ha @@ -110,8 +110,7 @@ cq = tup.0; if (cq == null && wait == 0 && submit == 0) { if (!needs_flush(ring)) { - // TODO: EAGAIN - abort(); + return null; }; overflow = true; }; -- 2.48.1