Debian Codegraph @

doc/man/nvme_mi_aem_enable.2

raw
1 .TH "nvme_mi_aem_enable" 9 "nvme_mi_aem_enable" "November 2025" "libnvme API manual" LINUX
2 .SH NAME
3 nvme_mi_aem_enable \- Enable AE on the provided endpoint
4 .SH SYNOPSIS
5 .B "int" nvme_mi_aem_enable
6 .BI "(nvme_mi_ep_t ep " ","
7 .BI "struct nvme_mi_aem_config *config " ","
8 .BI "void *userdata " ");"
9 .SH ARGUMENTS
10 .IP "ep" 12
11 Endpoint to enable AEs
12 .IP "config" 12
13 AE configuraiton including which events are enabled and the callback function
14 .IP "userdata" 12
15 Application provided context pointer for callback function
16 .SH "DESCRIPTION"
17 This function is called to enable AE on the endpoint. Endpoint will provide initial state
18 (if any) of enabled AEs and application can parse those via the aem_handler fn pointer in
19 callbacks. Thes can be obtained in the callback by calling \fBnvme_mi_aem_get_next_event\fP.
20
21 Application should poll the fd that can be obtained from nvme_mi_aem_get_fd and then call
22 \fBnvme_mi_aem_process\fP when \fBpoll\fP indicates data available.
23
24 A call to \fBnvme_mi_aem_process\fP will grab AEM data and call the aem_handler fn pointer.
25 At this point the application can call \fBnvme_mi_aem_get_next_event\fP to get information for
26 each triggered event.
27 .SH "RETURN"
28 0 is a success, nonzero is an error and errno may be read for further details