Blob Blame History Raw
;;;; Begin Copyright Notice
;
; Copyright 2015-2018, Intel Corporation
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions
; are met:
;
;     * Redistributions of source code must retain the above copyright
;       notice, this list of conditions and the following disclaimer.
;
;     * Redistributions in binary form must reproduce the above copyright
;       notice, this list of conditions and the following disclaimer in
;       the documentation and/or other materials provided with the
;       distribution.
;
;     * Neither the name of the copyright holder nor the names of its
;       contributors may be used to endorse or promote products derived
;       from this software without specific prior written permission.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;
;;;;  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