1io_uring_prep_poll_timeout(3)   liburing Manual  io_uring_prep_poll_timeout(3)
2
3
4

NAME

6       io_uring_prep_timeoute - prepare a timeout request
7

SYNOPSIS

9       #include <liburing.h>
10
11       void io_uring_prep_timeout(struct io_uring_sqe *sqe,
12                                  struct __kernel_timespec *ts,
13                                  unsigned count,
14                                  unsigned flags);
15

DESCRIPTION

17       The  io_uring_prep_timeout(3)  function prepares a timeout request. The
18       submission queue entry sqe is setup to arm a timeout  specified  by  ts
19       and  with  a timeout count of count completion entries. The flags argu‐
20       ment holds modifier flags for the request.
21
22       This request type can be used as a timeout waking anyone  sleeping  for
23       events on the CQ ring. The flags argument may contain:
24
25       IORING_TIMEOUT_ABS
26              The  value  specified  in  ts is an absolute value rather than a
27              relative one.
28
29       IORING_TIMEOUT_BOOTTIME
30              The boottime clock source should be used.
31
32       IORING_TIMEOUT_REALTIME
33              The realtime clock source should be used.
34
35       IORING_TIMEOUT_ETIME_SUCCESS
36              Consider an expired timeout a success in  terms  of  the  posted
37              completion.   Normally a timeout that triggers would return in a
38              -ETIME CQE res value.
39
40       IORING_TIMEOUT_MULTISHOT
41              The request will return multiple timeout completions.  The  com‐
42              pletion  flag  IORING_CQE_F_MORE is set if more timeouts are ex‐
43              pected. The value specified in count is the number of repeats. A
44              value  of  0  means  the  timeout  is indefinite and can only be
45              stopped by a removal request. Available since the 6.4 kernel.
46
47       The timeout completion event will trigger if either the specified time‐
48       out  has  occurred,  or the specified number of events to wait for have
49       been posted to the CQ ring.
50
51

RETURN VALUE

53       None
54

ERRORS

56       These are the errors that are reported in the CQE res  field.  On  suc‐
57       cess, 0 is returned.
58
59       -ETIME The  specified  timeout  occurred  and  triggered the completion
60              event.
61
62       -EINVAL
63              One of the fields set in the SQE was invalid. For  example,  two
64              clocksources  where  given,  or the specified timeout seconds or
65              nanoseconds where < 0.
66
67       -EFAULT
68              io_uring was unable to access the data specified by ts.
69
70       -ECANCELED
71              The timeout was canceled by a removal request.
72

NOTES

74       As with any request that passes in data in a struct, that data must re‐
75       main  valid  until the request has been successfully submitted. It need
76       not remain valid until completion. Once a request has  been  submitted,
77       the in-kernel state is stable. Very early kernels (5.4 and earlier) re‐
78       quired state to be stable until the completion  occurred.  Applications
79       can  test for this behavior by inspecting the IORING_FEAT_SUBMIT_STABLE
80       flag passed back from io_uring_queue_init_params(3).
81

SEE ALSO

83       io_uring_get_sqe(3),   io_uring_submit(3),    io_uring_prep_timeout_re‐
84       move(3), io_uring_prep_timeout_update(3)
85
86
87
88liburing-2.2                    March 12, 2022   io_uring_prep_poll_timeout(3)
Impressum