CXL_NEW(3)
CXL_NEW(3) β cxl_new π
okay so welcome to the libcxl Manual page for cxl_new, bestie. This is the creation moment where you get a library context handle, and itβs giving main character energy for all your library operations π
β¨ NAME β¨
cxl_new β Create a new library context object that acts as a handle for all library operations π«Ά
π SYNOPSIS π
#include <cxl/libcxl.h>
int cxl_new(struct cxl_ctx **ctx);
π¦ DESCRIPTION π¦
cxl_new instantiates a new library context, and stores an opaque pointer in ctx. No cap, that pointer is literally your handle. 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
πΈ EXAMPLE πΈ
See example usage in test/libcxl.c π
π§ COPYRIGHT π§
Copyright Β© 2016 - 2022, Intel Corporation. License GPLv2: GNU GPL version 2 http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
π SEE ALSO π
linklibcxl:cxl_ref[3]linklibcxl:cxl_unref[3]
xoxo, this page is brought to you by libcxl, dated 2026-06-30, and filed under CXL_NEW(3) πβ¨
π¦ where this page comes from
- arch rolling: ndctl 85-1 Β· LGPL-2.1-only AND GPL-2.0-only AND CC0-1.0 AND MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms