NAME¶
cxl_set_mode - set the programming mode of an AFU
SYNOPSIS¶
#include <libcxl.h>
int cxl_set_mode(struct cxl_afu_h *afu,
long value);
DESCRIPTION¶
cxl_set_mode() sets the programming mode of afu to value.
value must be one of the modes returned by
cxl_get_modes_supported(): CXL_MODE_DEDICATED or
CXL_MODE_DIRECTED. Mode will be changed provided that no user contexts
are attached.
RETURN VALUE¶
On success, 0 is returned. On error, -1 is returned and errno is set
appropriately.
ERRORS¶
- EBUSY
- User context attached.
- EINVAL
- Invalid argument value.
SEE ALSO¶
cxl(3), cxl_adapter_afu_next(3), cxl_afu_attach(3),
cxl_afu_attach_full(3), cxl_afu_attach_work(3),
cxl_afu_fd_to_h(3), cxl_afu_next(3), cxl_afu_open_dev(3),
cxl_afu_open_h(3), cxl_get_mode(3),
cxl_get_modes_supported(3)