.\" Copyright 2015-2018 IBM Corp. .\" .TH CXL_WORK_ALLOC 3 2018-02-13 "LIBCXL 1.5" "CXL Programmer's Manual" .SH NAME cxl_work_alloc \- allocate and initialize a work structure .SH SYNOPSIS .B #include .PP .B "struct cxl_ioctl_start_work *cxl_work_alloc();" .SH DESCRIPTION .BR cxl_work_alloc () allocates, initializes, and returns a pointer to a work structure, that can be populated and passed to .BR cxl_afu_attach_work (). .SH RETURN VALUE On success, a pointer to the allocated structure is returned. On error, NULL is returned and .I errno is set appropriately. .SH ERRORS .TP .B ENOMEM Not enough memory. .SH SEE ALSO .BR cxl (3), .BR cxl_afu_attach_work (3), .BR cxl_work_disable_wait (3), .BR cxl_work_enable_wait (3), .BR cxl_work_free (3), .BR cxl_work_get_amr (3), .BR cxl_work_get_num_irqs (3), .BR cxl_work_get_tid (3), .BR cxl_work_get_wed (3), .BR cxl_work_set_amr (3), .BR cxl_work_set_num_irqs (3), .BR cxl_work_set_wed (3)