Man page - pmem2_get_flush_fn(3)
Packages contas this manual
- pmem2_config_set_vdm(3)
- pmem2_get_drain_fn(3)
- pmem2_source_get_fd(3)
- pmem2_config_set_length(3)
- pmem2_vm_reservation_map_find_prev(3)
- pmem2_deep_flush(3)
- pmem2_source_from_fd(3)
- libpmem2_unsafe_shutdown(7)
- pmem2_source_pread_mcsafe(3)
- pmem2_async(3)
- pmem2_config_set_sharing(3)
- pmem2_badblock_next(3)
- pmem2_source_from_anon(3)
- pmem2_source_get_handle(3)
- pmem2_source_device_id(3)
- pmem2_map_get_size(3)
- pmem2_config_delete(3)
- pmem2_map_get_address(3)
- pmem2_source_alignment(3)
- pmem2_source_device_usc(3)
- pmem2_config_set_vm_reservation(3)
- pmem2_get_flush_fn(3)
- pmem2_config_set_protection(3)
- pmem2_vm_reservation_new(3)
- pmem2_get_memset_fn(3)
- pmem2_badblock_context_delete(3)
- pmem2_config_new(3)
- pmem2_vm_reservation_delete(3)
- pmem2_vm_reservation_get_address(3)
- pmem2_source_size(3)
- pmem2_vm_reservation_shrink(3)
- pmem2_memcpy_async(3)
- pmem2_vm_reservation_map_find(3)
- pmem2_vm_reservation_map_find_last(3)
- pmem2_badblock_clear(3)
- pmem2_memset_async(3)
- pmem2_map_get_store_granularity(3)
- pmem2_memmove_async(3)
- pmem2_get_persist_fn(3)
- pmem2_vm_reservation_map_find_next(3)
- pmem2_vm_reservation_map_find_first(3)
- pmem2_source_pwrite_mcsafe(3)
- pmem2_get_memcpy_fn(3)
- pmem2_map_from_existing(3)
- pmem2_map_new(3)
- pmem2_get_memmove_fn(3)
- pmem2_config_set_required_store_granularity(3)
- pmem2_config_set_offset(3)
- pmem2_source_from_handle(3)
- libpmem2(7)
- pmem2_perror(3)
- pmem2_map_delete(3)
- pmem2_badblock_context_new(3)
- pmem2_vm_reservation_extend(3)
- pmem2_source_delete(3)
- pmem2_source_numa_node(3)
- pmem2_errormsg(3)
- pmem2_vm_reservation_get_size(3)
apt-get install libpmem2-dev
Manual
| () | PMDK Programmer's Manual | () |
NAME
pmem2_get_flush_fn() - get a flush function
SYNOPSIS
-
#include <libpmem2.h> typedef void (*pmem2_flush_fn)(const void *ptr, size_t size); struct pmem2_map; pmem2_flush_fn pmem2_get_flush_fn(struct pmem2_map *map);
DESCRIPTION
The pmem2_get_flush_fn() function returns a pointer to a function responsible for efficiently flushing data in the range owned by the map.
Flushing data using pmem2_flush_fn does not guarantee that the data is stored durably by the time it returns. To get this guarantee, application should either use the persist operation (see pmem2_get_persist_fn(3)) or follow pmem2_flush_fn by a drain operation (see pmem2_get_drain_fn(3)).
There are no alignment restrictions on the range described by ptr and size, but pmem2_flush_fn may expand the range as necessary to meet platform alignment requirements.
There is nothing atomic or transactional about pmem2_flush_fn. Any unwritten stores in the given range will be written, but some stores may have already been written by virtue of normal cache eviction/replacement policies. Correctly written code must not depend on stores waiting until pmem2_flush_fn is called to be flushed – they can be flushed at any time before pmem2_flush_fn is called.
If two (or more) mappings share the same pmem2_flush_fn and they are adjacent to each other, it is safe to call this function for a range spanning those mappings.
RETURN VALUE
The pmem2_get_flush_fn() function never returns NULL.
The pmem2_get_flush_fn() for the same map always returns the same function. This means that it’s safe to cache its return value. However, this function is very cheap (because it returns a precomputed value), so caching may not be necessary.
SEE ALSO
pmem2_get_drain_fn(3), pmem2_get_persist_fn(3), pmem2_map_new(3), libpmem2(7) and <https://pmem.io>
| 2023-05-31 | PMDK - |