17#include "libocxl_internal.h"
29#ifdef TEST_ENVIRONMENT
37__attribute__ ((used))
static void ocxl_set_sys_path(
const char *path)
49__attribute__ ((used))
static void ocxl_set_dev_path(
const char *path)
95 error_handler = handler;
121 return "AFU context not available";
124 return "AFU interrupt not available";
127 return "Internal error";
130 return "Already done";
133 return "Out of bounds";
136 return "No more contexts";
139 return "Invalid arguments";
142 return "Unknown error";
const char * ocxl_err_to_string(ocxl_err err)
Convert an error value to a string.
void ocxl_enable_messages(uint64_t sources)
Enable messages from libocxl open calls.
const char * ocxl_info()
Get version & compilation information about LibOCXL.
void ocxl_set_error_message_handler(void(*handler)(ocxl_err error, const char *message))
Override the default handler for emitting error messages from open calls.
ocxl_err
Potential return values from ocxl_* functions.
@ OCXL_NO_MORE_CONTEXTS
No more contexts can be opened on the AFU.
@ OCXL_NO_IRQ
no further interrupts are available, or the interrupt is invalid
@ OCXL_INVALID_ARGS
One or more arguments are invalid.
@ OCXL_OUT_OF_BOUNDS
The action requested falls outside the permitted area.
@ OCXL_INTERNAL_ERROR
an internal error has occurred
@ OCXL_OK
The call succeeded.
@ OCXL_ALREADY_DONE
The action requested has already been performed.
@ OCXL_NO_MEM
An out of memory error occurred.
@ OCXL_NO_CONTEXT
The call requires an open context on the AFU.
#define OCXL_TRACING
Tracing requested.
#define OCXL_ERRORS
Error messages requested.