.\" Automatically generated by Pandoc 2.0.6 .\" .TH "PMEM2_CONFIG_SET_REQUIRED_STORE_GRANULARITY" "3" "2022-08-25" "PMDK - pmem2 API version 1.0" "PMDK Programmer's Manual" .hy .\" SPDX-License-Identifier: BSD-3-Clause .\" Copyright 2020, Intel Corporation .SH NAME .PP \f[B]pmem2_config_set_required_store_granularity\f[]() \- set a granularity in pmem2_config structure. .SH SYNOPSIS .IP .nf \f[C] #include\ enum\ pmem2_granularity\ { \ \ \ \ PMEM2_GRANULARITY_BYTE, \ \ \ \ PMEM2_GRANULARITY_CACHE_LINE, \ \ \ \ PMEM2_GRANULARITY_PAGE, }; int\ pmem2_config_set_required_store_granularity(struct\ pmem2_config\ *cfg, \ \ \ \ \ \ \ \ enum\ pmem2_granularity\ g); \f[] .fi .SH DESCRIPTION .PP The \f[B]pmem2_config_set_required_store_granularity\f[]() sets a maximum permitted granularity \f[I]g\f[] requested by user in the \f[I]pmem2_config\f[] structure. .PP Granularity must be one of the following values: .IP \[bu] 2 \f[B]PMEM2_GRANULARITY_BYTE\f[] .IP \[bu] 2 \f[B]PMEM2_GRANULARITY_CACHE_LINE\f[] .IP \[bu] 2 \f[B]PMEM2_GRANULARITY_PAGE\f[] .PP A description of the granularity concept can be found in \f[B]libpmem2\f[](7) manpage. .SH RETURN VALUE .PP The \f[B]pmem2_config_set_required_store_granularity\f[]() function returns 0 on success or a negative error code on failure. .SH ERRORS .PP The \f[B]pmem2_config_set_required_store_granularity\f[]() can fail with the following errors: .IP \[bu] 2 \f[B]PMEM2_E_GRANULARITY_NOT_SUPPORTED\f[] \- granularity \f[I]g\f[] is not a valid value. .SH SEE ALSO .PP \f[B]pmem2_config_new\f[](3), \f[B]libpmem2\f[](7) and \f[B]\f[]