| ... | @@ -284,7 +284,7 @@ fn copy_cqes_ready(self: *IoUring, cqes: []linux.io_uring_cqe) u32 { | ... | @@ -284,7 +284,7 @@ fn copy_cqes_ready(self: *IoUring, cqes: []linux.io_uring_cqe) u32 { |
| 284 | const head = self.cq.head.* & self.cq.mask; | 284 | const head = self.cq.head.* & self.cq.mask; |
| 285 | const tail = (self.cq.head.* +% count) & self.cq.mask; | 285 | const tail = (self.cq.head.* +% count) & self.cq.mask; |
| 286 | | 286 | |
| 287 | if (head <= tail) { | 287 | if (head < tail) { |
| 288 | // head behind tail -> no wrapping | 288 | // head behind tail -> no wrapping |
| 289 | @memcpy(cqes[0..count], self.cq.cqes[head..tail]); | 289 | @memcpy(cqes[0..count], self.cq.cqes[head..tail]); |
| 290 | } else { | 290 | } else { |