authorgravatar for joran@ronomon.comJoran Dirk Greef <joran@ronomon.com> 2020-09-19 16:54:44+02:00
committergravatar for joran@ronomon.comJoran Dirk Greef <joran@ronomon.com> 2020-09-19 16:54:44+02:00
log64ae9a6a870fc6d8295118f2d255ee661942dc78
tree0b78ea642c75f2a8730fafd47d1f75289933ad46
parentc1f9d10b6a0cb530ee1088a24193c322e255c23b

Rename to error.SubmissionQueueFull


1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/os/linux/io_uring.zig+2-2
......@@ -136,7 +136,7 @@ pub const IO_Uring = struct {
136136 // Remember that these head and tail offsets wrap around every four billion operations.
137137 // We must therefore use wrapping addition and subtraction to avoid a runtime crash.
138138 const next = self.sq.sqe_tail +% 1;
139 if (next -% head > self.sq.sqes.len) return error.IO_UringSubmissionQueueFull;
139 if (next -% head > self.sq.sqes.len) return error.SubmissionQueueFull;
140140 var sqe = &self.sq.sqes[self.sq.sqe_tail & self.sq.mask.*];
141141 self.sq.sqe_tail = next;
142142 return sqe;
......@@ -716,7 +716,7 @@ test "queue_readv" {
716716 ring.use_registered_fd(sqe);
717717 testing.expectEqual(@as(u8, linux.IOSQE_FIXED_FILE), sqe.flags);
718718
719 testing.expectError(error.IO_UringSubmissionQueueFull, ring.queue_nop(0));
719 testing.expectError(error.SubmissionQueueFull, ring.queue_nop(0));
720720 testing.expectEqual(@as(u32, 1), try ring.submit());
721721 testing.expectEqual(linux.io_uring_cqe {
722722 .user_data = 0xcccccccc,