aboutsummaryrefslogtreecommitdiff
path: root/man/io_uring_cqe_get_data.3
blob: 4cbb32cd864e12c28fcfe2e4c48adf5f2fbe86ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.\" Copyright (C) 2021 Stefan Roesch <shr@fb.com>
.\"
.\" SPDX-License-Identifier: LGPL-2.0-or-later
.\"
.TH io_uring_cqe_get_data 3 "November 15, 2021" "liburing-2.1" "liburing Manual"
.SH NAME
io_uring_cqe_get_data \- get user data for completion event
.SH SYNOPSIS
.nf
.B #include <liburing.h>
.PP
.BI "void *io_uring_cqe_get_data(struct io_uring_cqe *" cqe ");"
.BI "
.BI "__u64 io_uring_cqe_get_data64(struct io_uring_cqe *" cqe ");"
.fi
.SH DESCRIPTION
.PP
The
.BR io_uring_cqe_get_data (3)
function returns the user_data with the completion queue entry
.IR cqe
as a data pointer.

The
.BR io_uring_cqe_get_data64 (3)
function returns the user_data with the completion queue entry
.IR cqe
as a 64-bit data value.

After the caller has received a completion queue entry (CQE) with
.BR io_uring_wait_cqe (3),
the application can call
.BR io_uring_cqe_get_data (3)
or
.BR io_uring_cqe_get_data64 (3)
function to retrieve the
.I user_data
value. This requires that
.I user_data
has been set earlier with the function
.BR io_uring_sqe_set_data (3)
or
.BR io_uring_sqe_set_data64 (3).

.SH RETURN VALUE
If the
.I user_data
value has been set before submitting the request, it will be returned.
Otherwise the functions returns NULL.
.SH SEE ALSO
.BR io_uring_get_sqe (3),
.BR io_uring_sqe_set_data (3),
.BR io_uring_sqe_submit (3)