| author | |
| committer | |
| log | 7a1dbbd4f93f7e6221eab7f8c26b464685728bf6 |
| tree | c3432570b05f586e24a553a75a903ec2404347f6 |
| parent | bf0387b6bb9c65c30f14e699a2f2cfbfea27184e |
There is no grantee that `copy_cqes` will return exactly wait_nr number of cqes.
If there are ready cqes it can return > 0 but < wait_nr number of cqes.1 files changed, 2 insertions(+), 1 deletions(-)
lib/std/os/linux/io_uring.zig+2-1| ... | ... | @@ -2329,7 +2329,8 @@ test "timeout_remove" { |
| 2329 | 2329 | // * kernel 5.18 gives user data 0x99999999 first, 0x88888888 second |
| 2330 | 2330 | |
| 2331 | 2331 | var cqes: [2]os.linux.io_uring_cqe = undefined; |
| 2332 | try testing.expectEqual(@as(u32, 2), try ring.copy_cqes(cqes[0..], 2)); | |
| 2332 | cqes[0] = try ring.copy_cqe(); | |
| 2333 | cqes[1] = try ring.copy_cqe(); | |
| 2333 | 2334 | |
| 2334 | 2335 | for (cqes) |cqe| { |
| 2335 | 2336 | // IORING_OP_TIMEOUT_REMOVE is not supported by this kernel version: |