;;;; Begin Copyright Notice
; SPDX-License-Identifier: BSD-3-Clause
; Copyright 2015-2018, Intel Corporation
;;;;  End Copyright Notice

;
; XXX - libpmem exports mmap/munmap/msync/mprotect functions
;
; This is a _temporary_ solution to make those function available for all
; the other PMDK libraries and to have only one instance of a file mapping
; list (owned by libpmem).  Otherwise, each library would have its own
; instance of the file mapping list, resulting in libpmem being not able
; to find a file handle associated with the mapping address passed to
; pmem_msync(), pmem_memcpy(), etc. causing those functions to fail.
;
; The proposed target solution would include:
; - implementation of pmem_mmap, pmem_unmap, pmem_msync and
;   pmem_mprotect functions in libpmem (pmem_unmap and pmem_msync are
;   already there);
; - making sure that all the PMDK libraries never call mmap, munmap,
;   msync and mprotect directly, but only through their libpmem counterparts;
; - new pmem_mmap() function must provide similar functionality to
;   mmap(), i.e. it must take 'offset' argument, but should not take
;   file descriptor argument.  Perhaps it could be an opaque handle
;   to the file, that is internally casted to a file descriptor
;   or a HANDLE, depending on the OS.
;

LIBRARY libpmem

VERSION 1.0

EXPORTS
	pmem_map_fileU
	pmem_map_fileW
	pmem_unmap
	pmem_is_pmem
	pmem_persist
	pmem_msync
	pmem_has_auto_flush
	pmem_deep_persist
	pmem_flush
	pmem_deep_flush
	pmem_deep_drain
	pmem_drain
	pmem_has_hw_drain
	pmem_memmove_persist
	pmem_memcpy_persist
	pmem_memset_persist
	pmem_memmove_nodrain
	pmem_memcpy_nodrain
	pmem_memset_nodrain
	pmem_memmove
	pmem_memcpy
	pmem_memset
	pmem_check_versionU
	pmem_check_versionW
	pmem_errormsgU
	pmem_errormsgW

	mmap
	munmap
	msync
	mprotect

	DllMain
