DOKK / manpages / debian 10 / libcxl-dev / cxl_work_get_tid.3.en
CXL_WORK_GET_TID(3) CXL Programmer's Manual CXL_WORK_GET_TID(3)

cxl_work_get_tid - get the tid of the thread that will wait

#include <libcxl.h>

int cxl_work_get_tid(struct cxl_ioctl_start_work *work, __u16 *valp);

The tunneled operation as_notify is supported on POWER9. See cxl_get_tunneled_ops_supported().

cxl_work_get_tid() copies to the address pointed to by valp the 16-bit tid value assigned by cxl_afu_attach_work() to the thread that will wait to be notified by the AFU with cxl_afu_host_thread_wait(). The work structure must have been wait-enabled with cxl_work_enable_wait().

Note: the 16-bit tid returned by cxl_work_get_tid() is a capi-specific value, unrelated to the thread ID returned by the Linux system call gettid().

On success, 0 is returned. On error, -1 is returned and errno is set appropriately.

Invalid argument value, or AFU context not attached, or wait not enabled

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), gettid(2)

2018-04-24 LIBCXL 1.6