aboutsummaryrefslogtreecommitdiff
path: root/man/io_uring_cqe_get_data.3
blob: 9112ee3381792db143ea76dccb4db7644ce2177a (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
.\" 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 ");"
.fi
.SH DESCRIPTION
.PP
The
.BR io_uring_cqe_get_data (3)
function returns the user_data with the completion queue entry
.IR cqe .

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)
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).

.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)