diff options
Diffstat (limited to 'src/io/io_linux.zig')
-rw-r--r-- | src/io/io_linux.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/io/io_linux.zig b/src/io/io_linux.zig index 2ba2b3e36..4e4d9137f 100644 --- a/src/io/io_linux.zig +++ b/src/io/io_linux.zig @@ -453,6 +453,10 @@ completed: FIFO(Completion) = .{}, next_tick: FIFO(Completion) = .{}, +pub fn hasNoWork(this: *IO) bool { + return this.completed.peek() == null and this.unqueued.peek() == null and this.next_tick.peek() == null; +} + pub fn init(entries_: u12, flags: u32) !IO { var ring: IO_Uring = undefined; var entries = entries_; |