cxl_new(3)

cxl_new3

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

Usage

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

Overview

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].

Return value

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

• -ENOMEM

• -ENXIO

Examples

See example usage in test/libcxl.c

Releases

3 releases since Debian 12 (Bookworm); the text changed 2 times.

  1. 12
  2. 13
  3. Arch

From ndctl 85-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.