diff options
Diffstat (limited to 'include/qemu')
-rw-r--r-- | include/qemu/pmem.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/qemu/pmem.h b/include/qemu/pmem.h new file mode 100644 index 0000000..ebdb070 --- /dev/null +++ b/include/qemu/pmem.h @@ -0,0 +1,30 @@ +/* + * QEMU header file for libpmem. + * + * Copyright (c) 2018 Intel Corporation. + * + * Author: Haozhong Zhang <address@hidden> + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#ifndef QEMU_PMEM_H +#define QEMU_PMEM_H + +#ifdef CONFIG_LIBPMEM +#include <libpmem.h> +#else /* !CONFIG_LIBPMEM */ + +static inline void * +pmem_memcpy_persist(void *pmemdest, const void *src, size_t len) +{ + /* If 'pmem' option is 'on', we should always have libpmem support, + or qemu will report a error and exit, never come here. */ + g_assert_not_reached(); + return NULL; +} + +#endif /* CONFIG_LIBPMEM */ + +#endif /* !QEMU_PMEM_H */ |