CXL_READ_EXPECTED_EVENT(3) | CXL Manual | CXL_READ_EXPECTED_EVENT(3) |
cxl_read_expected_event - read one CXL event from an AFU, and treat it as a failure, if it did not match an expected event
#include <libcxl.h>
int cxl_read_expected_event(struct cxl_afu_h *afu, struct cxl_event *event, __u32 type, __u16 irq);
cxl_read_expected_event() reads one CXL event from afu, when an event of type is expected, and copies it to the structure pointed to by event. For AFU interrupts, the expected AFU interrupt number irq may also be supplied (0 will accept any AFU interrupt).
On success, 0 is returned if the read event was of the expected type and (if applicable) AFU interrupt number. If the event did not match the type and interrupt, -1 is returned.
On error, -2 is returned and errno is set appropriately.
cxl(3), cxl_afu_fd_to_h(3), cxl_afu_open_dev(3), cxl_afu_open_h(3), cxl_afu_opened(3), cxl_fprint_event(3), cxl_fprint_unknown_event(3), cxl_event_pending(3), cxl_read_event(3), open(2), read(2)
2017-05-24 | LIBCXL 1.5 |