| 32 | } |
| 33 | |
| 34 | static void t_prep_timeout(struct io_uring_sqe *sqe, |
| 35 | const struct __kernel_timespec *ts, |
| 36 | unsigned flags, |
| 37 | bool immediate) |
| 38 | { |
| 39 | if (!immediate) { |
| 40 | io_uring_prep_timeout(sqe, ts, 0, 0); |
| 41 | } else { |
| 42 | io_uring_prep_timeout(sqe, NULL, 0, 0); |
| 43 | sqe->addr = ts->tv_sec * 1000000000 + ts->tv_nsec; |
| 44 | sqe->timeout_flags = IORING_TIMEOUT_IMMEDIATE_ARG; |
| 45 | } |
| 46 | sqe->timeout_flags |= flags; |
| 47 | } |
| 48 | |
| 49 | /* |
| 50 | * Test that we return to userspace if a timeout triggers, even if we |
no outgoing calls