'\" t .\" Title: cxl_new .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.20 .\" Date: 2024-01-12 .\" Manual: libcxl Manual .\" Source: libcxl .\" Language: English .\" .TH "CXL_NEW" "3" "2024-01-12" "libcxl" "libcxl Manual" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "NAME" cxl_new \- Create a new library context object that acts as a handle for all library operations .SH "SYNOPSIS" .sp .if n .RS 4 .nf .fam C #include int cxl_new(struct cxl_ctx **ctx); .fam .fi .if n .RE .SH "DESCRIPTION" .sp 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]. .SH "RETURN VALUE" .sp Returns 0 on success, and a negative errno on failure. Possible error codes are: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} \-ENOMEM .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} \-ENXIO .RE .SH "EXAMPLE" .sp See example usage in test/libcxl.c .SH "COPYRIGHT" .sp Copyright \(co 2016 \- 2022, Intel Corporation. License GPLv2: GNU GPL version 2 \c .URL "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. .SH "SEE ALSO" .sp linklibcxl:cxl_ref[3], linklibcxl:cxl_unref[3]