1io_uring_prep_poll_timeout_updatel(i3b)uring Mainou_aulring_prep_poll_timeout_update(3)
2
3
4
6 io_uring_prep_timeoute_update - prepare a request to update an existing
7 timeout
8
10 #include <liburing.h>
11
12 void io_uring_prep_timeout_update(struct io_uring_sqe *sqe,
13 struct __kernel_timespec *ts,
14 __u64 user_data,
15 unsigned flags);
16
17 void io_uring_prep_timeout_remove(struct io_uring_sqe *sqe,
18 __u64 user_data,
19 unsigned flags);
20
22 These functions modify or cancel an existing timeout request. The sub‐
23 mission queue entry sqe is setup to arm a timeout update or removal
24 specified by user_data and with modifier flags given by flags. Addi‐
25 tionally, the update request includes a ts structure, which contains
26 new timeout information.
27
28 For an update request, the flags member may contain a bitmask of the
29 following values:
30
31 IORING_TIMEOUT_ABS
32 The value specified in ts is an absolute value rather than a
33 relative one.
34
35 IORING_TIMEOUT_BOOTTIME
36 The boottime clock source should be used.
37
38 IORING_TIMEOUT_REALTIME
39 The realtime clock source should be used.
40
41 IORING_TIMEOUT_ETIME_SUCCESS
42 Consider an expired timeout a success in terms of the posted
43 completion. Normally a timeout that triggers would return in a
44 -ETIME CQE res value.
45
46 The timeout remove command does not currently accept any flags.
47
48
50 None
51
53 These are the errors that are reported in the CQE res field. On suc‐
54 cess, 0 is returned.
55
56 -ENOENT
57 The timeout identified by user_data could not be found. It may
58 be invalid, or triggered before the update or removal request
59 was processed.
60
61 -EALREADY
62 The timeout identified by user_data is already firing and cannot
63 be canceled.
64
65 -EINVAL
66 One of the fields set in the SQE was invalid. For example, two
67 clocksources where given, or the specified timeout seconds or
68 nanoseconds where < 0.
69
70 -EFAULT
71 io_uring was unable to access the data specified by ts.
72
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
83 io_uring_get_sqe(3), io_uring_submit(3), io_uring_prep_timeout(3)
84
85
86
87liburing-2.2 March 12, 2i0o2_2uring_prep_poll_timeout_update(3)