1PMEM2_CONFIG_SET_SHARING(3)PMDK Programmer's ManualPMEM2_CONFIG_SET_SHARING(3)
2
3
4

NAME

6       pmem2_config_set_sharing() - set sharing in the pmem2_config structure
7

SYNOPSIS

9              #include <libpmem2.h>
10
11              struct pmem2_config;
12              enum pmem2_sharing_type {
13                  PMEM2_SHARED,
14                  PMEM2_PRIVATE,
15              };
16              int pmem2_config_set_sharing(struct pmem2_config *config, enum pmem2_sharing_type sharing);
17

DESCRIPTION

19       The  pmem2_config_set_sharing()  function  configures  the behavior and
20       visibility of writes to the mapping’s pages.  The possible  values  are
21       listed below:
22
23PMEM2_SHARED  -  Writes  are  made directly to the underlying memory,
24         making them visible to other mappings  of  the  same  memory  region.
25         (default)
26
27PMEM2_PRIVATE  -  Writes  do not affect the underlying memory and are
28         not visible to other mappings of the same memory region.
29

RETURN VALUE

31       The pmem2_config_set_sharing() function returns 0 on success or a nega‐
32       tive error code on failure.
33

ERRORRS

35       The pmem2_config_set_sharing() can fail with the following errors:
36
37PMEM2_E_INVALID_SHARING_VALUE - sharing value is invalid.
38

SEE ALSO

40       libpmem2(7),   pmem2_config_new(3),  pmem2_map_new(3),  sysconf(3)  and
41       <http://pmem.io>
42
43
44
45PMDK - pmem2 API version 1.0      2020-10-28       PMEM2_CONFIG_SET_SHARING(3)
Impressum