qapi: Remove QMP events and commands from user-mode builds
[qemu/ar7.git] / include / qemu / pmem.h
blobd2d7ad085cc91c4f5de5047474c4d424b4e5df2f
1 /*
2 * QEMU header file for libpmem.
4 * Copyright (c) 2018 Intel Corporation.
6 * Author: Haozhong Zhang <address@hidden>
8 * This work is licensed under the terms of the GNU GPL, version 2 or later.
9 * See the COPYING file in the top-level directory.
12 #ifndef QEMU_PMEM_H
13 #define QEMU_PMEM_H
15 #ifdef CONFIG_LIBPMEM
16 #include <libpmem.h>
17 #else /* !CONFIG_LIBPMEM */
19 static inline void *
20 pmem_memcpy_persist(void *pmemdest, const void *src, size_t len)
22 /* If 'pmem' option is 'on', we should always have libpmem support,
23 or qemu will report a error and exit, never come here. */
24 g_assert_not_reached();
25 return NULL;
28 static inline void
29 pmem_persist(const void *addr, size_t len)
31 g_assert_not_reached();
34 #endif /* CONFIG_LIBPMEM */
36 #endif /* QEMU_PMEM_H */