nvml-sys 0.0.6

A low-level FFI wrapper around the Persistent Memory Development Kit, PMDK (formerly NVML) and its libraries, including libpmem, libpmemobj and others. Currently tracks master after version 1.3.1.
.\" Automatically generated by Pandoc 1.16.0.2
.\"
.TH "PMEMCTO_SET_ROOT_POINTER" "3" "2017-12-22" "PMDK - libpmemcto API version 1.0" "PMDK Programmer's Manual"
.hy
.\" Copyright 2014-2017, Intel Corporation
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\"     * Redistributions of source code must retain the above copyright
.\"       notice, this list of conditions and the following disclaimer.
.\"
.\"     * Redistributions in binary form must reproduce the above copyright
.\"       notice, this list of conditions and the following disclaimer in
.\"       the documentation and/or other materials provided with the
.\"       distribution.
.\"
.\"     * Neither the name of the copyright holder nor the names of its
.\"       contributors may be used to endorse or promote products derived
.\"       from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
.\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
.\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
.\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.SH NAME
.PP
pmemcto_set_root_pointer, pmemcto_get_root_pointer \-\- set or obtain
the root object pointer
.SH SYNOPSIS
.IP
.nf
\f[C]
#include\ <libpmemcto.h>

void\ pmemcto_set_root_pointer(PMEMctopool\ *pcp,\ void\ *ptr);
void\ *pmemcto_get_root_pointer(PMEMctopool\ *pcp);
\f[]
.fi
.SH DESCRIPTION
.PP
The root object of persistent memory pool is an entry point for all
other persistent objects allocated using the \f[B]libpmemcto\f[](7)
APIs.
In other words, every single object stored in persistent memory pool
should have the root object at the end of its reference path.
There is exactly one root object in each pool.
.PP
The \f[B]pmemcto_set_root_pointer\f[]() function saves the pointer to
the root object in given pool.
The \f[I]ptr\f[] must have been returned by a previous call to
\f[B]pmemcto_malloc\f[](3), \f[B]pmemcto_calloc\f[](3) or
\f[B]pmemcto_realloc\f[](3) for \f[I]the same pool of memory\f[].
.PP
The \f[B]pmemcto_get_root_pointer\f[]() function returns the pointer to
the root object in given pool, or NULL if the root pointer was never
set.
.SH RETURN VALUE
.PP
The \f[B]pmemcto_set_root_pointer\f[]() function returns no value.
.PP
The \f[B]pmemcto_get_root_pointer\f[]() function returns the pointer to
the root object in given pool, or NULL if the root pointer was never
set.
.SH SEE ALSO
.PP
\f[B]libpmemcto\f[](7) and \f[B]<http://pmem.io>\f[]