NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
SEE ALSO
pmemset_new(), pmemset_delete() - allocate and free a structure for a pmemset object
#include <libpmemset.h>
struct pmemset;
struct pmemset_config;
int pmemset_new(struct pmemset **set, struct pmemset_config *cfg);
int pmemset_delete(struct pmemset **set);
The pmemset_new() function creates a new set by allocating and initializing set structure, pmemset, and returns it through the pointer in *set. Configuration data, passed by the *cfg, is copied into the set structure.
The pmemset_delete() function frees *set returned by pmemset_new() and sets *set to NULL. If *set is NULL, no operation is performed.
The pmemset_new() function returns 0 on success or a negative error code on failure. pmemset_new() sets *set variable to NULL on failure.
The pmemset_delete() function always returns 0.
pmemset_new() can fail with the following error:
errno(3), pmemset_config_new(3), libpmemset(7) and http://pmem.io
The contents of this web site and the associated GitHub repositories are BSD-licensed open source.