cxl_new - Man Page

Create a new library context object that acts as a handle for all library operations


.ft C
#include <cxl/libcxl.h>

int cxl_new(struct cxl_ctx **ctx);


Instantiates a new library context, and stores an opaque pointer in ctx. The context is freed by cxl_unref(3), i.e. cxl_new(3) implies an internal cxl_ref(3).

Return Value

Returns 0 on success, and a negative errno on failure. Possible error codes are:


See example usage in test/libcxl.c

See Also

cxl_ref(3), cxl_unref(3)

Referenced By


01/06/2022 libcxl 72.1 libcxl Manual