MCPcopy Create free account
hub / github.com/axboe/liburing / t_prep_timeout

Function t_prep_timeout

test/timeout.c:34–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34static 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

Callers 3

test_single_timeout_manyFunction · 0.85
test_single_timeoutFunction · 0.85
test_single_timeout_absFunction · 0.85

Calls

no outgoing calls

Tested by 3

test_single_timeout_manyFunction · 0.68
test_single_timeoutFunction · 0.68
test_single_timeout_absFunction · 0.68