logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Description

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

Example

See example usage in test/libcxl.c

Name

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

Return Value

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

See Also

linklibcxl:cxl_ref[3], linklibcxl:cxl_unref[3] libcxl 2024-11-01 CXL_NEW(3)

Synopsis

#include <cxl/libcxl.h> int cxl_new(struct cxl_ctx **ctx);

See Also