1io_uring_prep_poll_update(3) liburing Manual io_uring_prep_poll_update(3)
2
3
4
6 io_uring_prep_poll_update - update an existing poll request
7
9 #include <poll.h>
10 #include <liburing.h>
11
12 void io_uring_prep_poll_update(struct io_uring_sqe *sqe,
13 __u64 old_user_data,
14 __u64 new_user_data,
15 unsigned poll_mask,
16 unsigned flags);
17
19 The io_uring_prep_poll_update(3) function prepares a poll update re‐
20 quest. The submission queue entry sqe is setup to update a poll request
21 identified by old_user_data, replacing it with the new_user_data infor‐
22 mation. The poll_mask arguments contains the new mask to use for the
23 poll request, and flags argument contains modifier flags telling io_ur‐
24 ing what fields to update.
25
26 The flags modifier flags is a bitmask and may contain and OR'ed mask
27 of:
28
29 IORING_POLL_UPDATE_EVENTS
30 If set, the poll update request will replace the existing events
31 being waited for with the ones specified in the poll_mask argu‐
32 ment to the function.
33
34 IORING_POLL_UPDATE_USER_DATA
35 If set, the poll update request will update the existing
36 user_data of the request with the value passed in as the
37 new_user_data argument.
38
39 IORING_POLL_ADD_MULTI
40 If set, this will change the poll request from a singleshot to a
41 multishot request. This must be used along with IORING_POLL_UP‐
42 DATE_EVENTS as the event field must be updated to enable multi‐
43 shot.
44
45
47 None
48
50 These are the errors that are reported in the CQE res field. On suc‐
51 cess, 0 is returned.
52
53 -ENOENT
54 The request identified by user_data could not be located. This
55 could be because it completed before the cancelation request was
56 issued, or if an invalid identifier is used.
57
58 -EINVAL
59 One of the fields set in the SQE was invalid.
60
61 -EALREADY
62 The execution state of the request has progressed far enough
63 that cancelation is no longer possible. This should normally
64 mean that it will complete shortly, either successfully, or in‐
65 terrupted due to the cancelation.
66
67 -ECANCELED
68 IORING_POLL_UPDATE_EVENTS was set and an error occurred re-arm‐
69 ing the poll request with the new mask. The original poll re‐
70 quest is terminated if this happens, and that termination CQE
71 will contain the reason for the error re-arming.
72
74 io_uring_get_sqe(3), io_uring_submit(3), io_uring_prep_poll_add(3),
75 io_uring_prep_poll_multishot(3)
76
77
78
79liburing-2.2 March 12, 2022 io_uring_prep_poll_update(3)