From 7d8e54ab1aabc61eef680db44db8e0f7de41ff4b Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 01 Sep 2021 11:46:31 +0200 Subject: [PATCH] all: yield WIP Signed-off-by: Drew DeVault --- io_uring/cqe.ha | 2 +- io_uring/setup.ha | 2 +- diff --git a/io_uring/cqe.ha b/io_uring/cqe.ha index d12f77edcbbba49f1a8a63333e054119c7a49d34..71054122cdd2ff57e0481b323e6599e1a4e2da95 100644 --- a/io_uring/cqe.ha +++ b/io_uring/cqe.ha @@ -17,7 +17,7 @@ return match (get_cqe(ring, 0, 1)) { err: error => err, cq: nullable *cqe => { assert(cq != null); // XXX: Correct? - cq: *cqe; + yield cq: *cqe; }, }; }; diff --git a/io_uring/setup.ha b/io_uring/setup.ha index 99084afef2c343e3b7db6bde9461705bd63518ee..8bc747c9a1d92a06fb07b19c517fcb4654bea497 100644 --- a/io_uring/setup.ha +++ b/io_uring/setup.ha @@ -39,7 +39,7 @@ ptr: *void => ptr, }; cq.ring_ptr = if (uring.features & features::SINGLE_MMAP == features::SINGLE_MMAP) { - sq.ring_ptr; + yield sq.ring_ptr; } else match (rt::mmap(null, cq.ring_sz, rt::PROT_READ | rt::PROT_WRITE, rt::MAP_SHARED | rt::MAP_POPULATE, -- 2.48.1