replay: interrupts and exceptions
[qemu/ar7.git] / include / qemu / memfd.h
blob53858ed43cfe39a81d4703b098b0ae1417a4d6eb
1 #ifndef QEMU_MEMFD_H
2 #define QEMU_MEMFD_H
4 #include "config-host.h"
5 #include <stdbool.h>
7 #ifndef F_LINUX_SPECIFIC_BASE
8 #define F_LINUX_SPECIFIC_BASE 1024
9 #endif
11 #ifndef F_ADD_SEALS
12 #define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
13 #define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
15 #define F_SEAL_SEAL 0x0001 /* prevent further seals from being set */
16 #define F_SEAL_SHRINK 0x0002 /* prevent file from shrinking */
17 #define F_SEAL_GROW 0x0004 /* prevent file from growing */
18 #define F_SEAL_WRITE 0x0008 /* prevent writes */
19 #endif
21 void *qemu_memfd_alloc(const char *name, size_t size, unsigned int seals,
22 int *fd);
23 void qemu_memfd_free(void *ptr, size_t size, int fd);
24 bool qemu_memfd_check(void);
26 #endif /* QEMU_MEMFD_H */