nvme_mi_aem_enable(9)
β¨ nvme_mi_aem_enable β¨
okay bestie, welcome to the libnvme API manual, section 9 β and today's main character is nvme_mi_aem_enable, aka the girl whose whole job is turning on Asynchronous Events (AEs) on an endpoint π
πΈ NAME πΈ
nvme_mi_aem_enable β Enable AE on the provided endpoint
π¦ SYNOPSIS π¦
int nvme_mi_aem_enable (nvme_mi_ep_t ep , struct nvme_mi_aem_config
*config , void *userdata );
π ARGUMENTS π
epβ the Endpoint you wanna enable AEs on π«Άconfigβ your AE configuration, which includes which events are enabled and the callback function. it's giving "here's the whole vibe, now go off" β¨userdataβ an application-provided context pointer for the callback function. your little backpack of stuff you wanna carry along π
π DESCRIPTION π
so like, you call this function to enable AE on the endpoint. no cap.
Once that's happening, the endpoint will hand over the initial state (if there is any) of the enabled AEs, and your application can parse all of that through the aem_handler fn pointer inside callbacks. and where do you get those? bestie, you grab them in the callback by calling nvme_mi_aem_get_next_event. simple as π§
Your application should poll the fd β and you can get that fd from nvme_mi_aem_get_fd β and then call nvme_mi_aem_process when the poll says data is available. that's the whole loop, iykyk π₯
A call to nvme_mi_aem_process will grab the AEM data and call the aem_handler fn pointer. at that exact point, your application can call nvme_mi_aem_get_next_event to get the info for each triggered event. one event at a time, iconic behavior π
β RETURN β
0 is a success, nonzero is an error β and errno may be read for further details. so if it's nonzero, go read errno, she's trying to tell you something π
and that's the whole page, bestie π this one came from the libnvme API manual, dated August 2026 β nvme_mi_aem_enable(9), periodt. π
π¦ where this page comes from
- fedora 44: libnvme-doc 1.16.2-1.fc44 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms