1CXL_NEW(3)                                                          CXL_NEW(3)
2
3
4

NAME

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

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

20       Returns 0 on success, and a negative errno on failure. Possible error
21       codes are:
22
23       •   -ENOMEM
24
25       •   -ENXIO
26

EXAMPLE

28       See example usage in test/libcxl.c
29
31       Copyright © 2016 - 2022, Intel Corporation. License GPLv2: GNU GPL
32       version 2 http://gnu.org/licenses/gpl.html. This is free software: you
33       are free to change and redistribute it. There is NO WARRANTY, to the
34       extent permitted by law.
35

SEE ALSO

37       linklibcxl:cxl_ref[3], linklibcxl:cxl_unref[3]
38
39
40
41                                  03/08/2022                        CXL_NEW(3)
Impressum