.\" Copyright 2018 IBM Corp. .\" .TH CXL_WORK_GET_TID 3 2018-04-24 "LIBCXL 1.6" "CXL Programmer's Manual" .SH NAME cxl_work_get_tid \- get the tid of the thread that will wait .SH SYNOPSIS .B #include .PP .B "int cxl_work_get_tid(struct cxl_ioctl_start_work" .BI * work ", __u16 *" valp ); .SH DESCRIPTION The tunneled operation as_notify is supported on POWER9. See .BR cxl_get_tunneled_ops_supported (). .PP .BR cxl_work_get_tid () copies to the address pointed to by .I valp the 16-bit tid value assigned by .BR cxl_afu_attach_work () to the thread that will wait to be notified by the AFU with .BR cxl_afu_host_thread_wait (). The .I work structure must have been wait-enabled with .BR cxl_work_enable_wait (). .PP Note: the 16-bit tid returned by .BR cxl_work_get_tid () is a capi-specific value, unrelated to the thread ID returned by the Linux system call .BR gettid (). .SH RETURN VALUE On success, 0 is returned. On error, \-1 is returned and .I errno is set appropriately. .SH ERRORS .TP .B EINVAL Invalid argument value, or AFU context not attached, or wait not enabled .SH SEE ALSO .BR cxl (3), .BR cxl_afu_attach_work (3), .BR cxl_afu_host_thread_wait (3), .BR cxl_get_tunneled_ops_supported (3), .BR cxl_work_disable_wait (3), .BR cxl_work_enable_wait (3), .BR gettid(2)