.\" Copyright 2015-2017 IBM Corp. .\" .TH CXL_READ_EVENT 3 2017-05-24 "LIBCXL 1.5" "CXL Programmer's Manual" .SH NAME cxl_read_event \- read one CXL event from an AFU .SH SYNOPSIS .B #include .PP .BI "int cxl_read_event(struct cxl_afu_h *" afu , .BI "struct cxl_event *" event ); .SH DESCRIPTION .BR cxl_read_event () reads one CXL event from .IR afu , and copies it to the structure pointed to by .IR event . .SH RETURN VALUE On success, 0 is returned. On error, \-1 is returned and .I errno is set appropriately. .SH ERRORS .TP .B EAGAIN AFU device opened with .BR O_NONBLOCK , and no data immediately available. .TP .B EINTR Interrupted .BR read () system call. .TP .B EINVAL Invalid argument value, or AFU not opened. .TP .B EIO Unrecoverable error. .TP .B ENODATA No data returned by .BR read (). .TP .B ENOMEM Insufficient memory. .SH FILES .TP .BI /dev/cxl/afu . d AFU device in dedicated process mode. .TP .BI /dev/cxl/afu . m AFU device in AFU directed mode, master context. .TP .BI /dev/cxl/afu . s AFU device in AFU directed mode, slave context. .SH SEE ALSO .BR cxl (3), .BR cxl_afu_fd_to_h (3), .BR cxl_afu_open_dev (3), .BR cxl_afu_open_h (3), .BR cxl_afu_opened (3), .BR cxl_fprint_event (3), .BR cxl_fprint_unknown_event (3), .BR cxl_event_pending (3), .BR cxl_read_expected_event (3), .BR open (2), .BR read (2)