.\" Automatically generated by Pandoc 2.9.2.1 .\" .TH "" "" "2023-05-26" "PMDK - " "PMDK Programmer's Manual" .hy .\" SPDX-License-Identifier: BSD-3-Clause .\" Copyright 2022, Intel Corporation .SH NAME .PP \f[B]pmem2_config_set_vdm\f[R]()(DEPRECATED), \f[B]pmem2_memcpy_async\f[R]()(DEPRECATED), \f[B]pmem2_memmove_async\f[R]()(DEPRECATED), \f[B]pmem2_memset_async\f[R]()(DEPRECATED) - asynchronous data movement operations .RS .PP NOTICE: Support for async functions is deprecated since PMDK 1.13.0 release and will be removed in the PMDK 1.14.0 release along with the miniasync dependency. .RE .SH SYNOPSIS .IP .nf \f[C] #define PMEM2_USE_MINIASYNC 1 #include struct pmem2_future; int pmem2_config_set_vdm(struct pmem2_config *cfg, struct vdm *vdm); struct pmem2_future pmem2_memcpy_async(struct pmem2_map *map, void *pmemdest, const void *src, size_t len, unsigned flags); struct pmem2_future pmem2_memmove_async(struct pmem2_map *map, void *pmemdest, const void *src, size_t len, unsigned flags) struct pmem2_future pmem2_memset_async(struct pmem2_map *map, void *pmemstr, int c, size_t n, unsigned flags) { \f[R] .fi .SH DESCRIPTION .PP To use those functions, you must have \f[I]libminiasync\f[R] installed. Those functions use futures and vdm (virtual data mover) concepts from this library. Please check \f[B]miniasync\f[R](7) for more details. .PP The struct \f[B]pmem2_future\f[R] is a structure describing a task to be done asynchronously taking into account persistence of the operation. It means that by the time the future is complete, all the data is safely written into a persistent domain. .PP The \f[B]pmem2_config_set_vdm\f[R] sets a vdm structure in the \f[I]pmem2_config\f[R]. This structure will be used by pmem2_*_async functions, to create a \f[I]pmem2_future\f[R]. If vdm is not set in the config, pmem2_map_new will use a default one which uses a pmem2 memory movement functions to perform memory operations. (\f[B]pmem2_get_memcpy_fn\f[R](3), \f[B]pmem2_get_memmove_fn\f[R](3), \f[B]pmem2_get_memset_fn\f[R](3)). .PP The \f[B]pmem2_memcpy_async\f[R] uses \f[I]vdm\f[R] structure held inside the \f[I]pmem2_map\f[R] structure to initialise and returns \f[B]pmem2_future\f[R]. This future will perform memcpy operation defined in \f[I]vdm\f[R] to copy \f[I]len\f[R] bytes from \f[I]src\f[R] to \f[I]pmemdest\f[R]. In the current implementation \f[I]flags\f[R] are ignored. .PP The \f[B]pmem2_memmove_async\f[R] returns \f[B]pmem2_future\f[R] which will perform memmove operation defined in \f[I]vdm\f[R] to copy \f[I]len\f[R] bytes from \f[I]src\f[R] to \f[I]pmemdest\f[R]. In the current implementation \f[I]flags\f[R] are ignored. .PP The \f[B]pmem2_memset_async\f[R] returns \f[B]pmem2_future\f[R] which will perform memset operation defined in \f[I]vdm\f[R] to fill \f[I]n\f[R] bytes from \f[I]pmemstr\f[R] with value of int \f[I]c\f[R] interpreted as unsigned char. In the current implementation \f[I]flags\f[R] are ignored. .SH RETURN VALUE .PP The \f[B]pmem2_config_set_vdm\f[R] always return 0. .PP The \f[B]pmem2_memcpy_async\f[R] returns a new instance of \f[B]pmem2_future\f[R] performing memcpy operation. You can execute returned structure using methods from the \f[B]libminiasync\f[R]() library such as \f[B]FUTURE_BUSY_POLL\f[R](3). .PP The \f[B]pmem2_memmove_async\f[R] returns a new instance of \f[B]pmem2_future\f[R] performing memmove operation. .PP The \f[B]pmem2_memset_async\f[R] returns a new instance of \f[B]pmem2_future\f[R] performing memset operation. .SH SEE ALSO .PP \f[B]memcpy\f[R](3), \f[B]memmove\f[R](3), \f[B]memset\f[R](3), \f[B]pmem2_get_drain_fn\f[R](3), \f[B]pmem2_get_memcpy_fn\f[R](3), \f[B]pmem2_get_memset_fn\f[R](3), \f[B]pmem2_map_new\f[R](3), \f[B]pmem2_get_persist_fn\f[R](3), \f[B]vdm_memcpy\f[R](3), \f[B]miniasync\f[R](7), \f[B]miniasync_future\f[R](7), \f[B]libpmem2\f[R](7) and \f[B]\f[R]