- bullseye 1.7-2+b1
cxl_afu_host_thread_wait - wait for AFU notification
int afu_host_thread_wait(struct cxl_afu_h *afu, volatile __u64 *uword);
The tunneled operation as_notify is supported on POWER9. See cxl_get_tunneled_ops_supported().
The thread calling afu_host_thread_wait() executes the instruction "wait" and goes to sleep. It will resume execution upon receiving an interrupt or an afu notification. It will then check the value of the shared memory word pointed to by uword. The thread will loop and sleep again while the value of uword is equal to zero. It will return from afu_host_thread_wait() when the value of uword becomes different from zero.
The thread calling afu_host_thread_wait() must have attached an afu context to a work structure with cxl_afu_attach_work() The work structure must have been wait-enabled with cxl_work_enable_wait().
On success, 0 is returned. On error, -1 is returned and errno is set appropriately.
cxl(3), cxl_afu_attach_work(3), cxl_afu_host_thread_wait(3), cxl_get_tunneled_ops_supported(3), cxl_work_disable_wait(3), cxl_work_enable_wait(3), cxl_work_get_tid(3)