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

NAME

6       io_uring_prep_link_timeout - a timeout request for linked sqes
7

SYNOPSIS

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

DESCRIPTION

16       The  io_uring_prep_link_timeout(3)  function prepares a timeout request
17       for linked sqes. The submission queue  entry  sqe  is  setup a  timeout
18       specified by ts.  The flags argument holds modifier flags for the time‐
19       out behaviour of the request.
20
21       The ts argument must be filled in with the appropriate information  for
22       the timeout. It looks as follows:
23
24           struct __kernel_timespec {
25               __kernel_time64_t tv_sec;
26               long long tv_nsec;
27           };
28
29       The flags argument may contain:
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.
44
45       It is invalid to create a chain (linked sqes) consisting only of a link
46       timeout request. If all the requests in the chain are completed  before
47       timeout,  then  the  link timeout request gets cancelled. Upon timeout,
48       all the uncompleted requests in the chain get cancelled.
49
50

RETURN VALUE

52       None
53
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              clock  sources  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  because  all submitted  requests  were
72              completed  successfully or one of the requests resulted in fail‐
73              ure.
74
75
76

SEE ALSO

78       io_uring_get_sqe(3), io_uring_prep_timeout(3)
79
80
81
82liburing-2.4                   January 23, 2023  io_uring_prep_link_timeout(3)
Impressum