mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-01 06:21:52 -06:00
include: Move qemu_mprotect_*() to new qemu/mprotect.h
The qemu_mprotect_*() family of functions are used in very few files; move them from osdep.h to a new qemu/mprotect.h. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220208200856.3558249-3-peter.maydell@linaro.org
This commit is contained in:
parent
b85ea5fa2f
commit
f2241d16ea
4 changed files with 16 additions and 4 deletions
14
include/qemu/mprotect.h
Normal file
14
include/qemu/mprotect.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* QEMU mprotect functions
|
||||
*
|
||||
* 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_MPROTECT_H
|
||||
#define QEMU_MPROTECT_H
|
||||
|
||||
int qemu_mprotect_rw(void *addr, size_t size);
|
||||
int qemu_mprotect_rwx(void *addr, size_t size);
|
||||
int qemu_mprotect_none(void *addr, size_t size);
|
||||
|
||||
#endif
|
|
@ -496,10 +496,6 @@ void sigaction_invoke(struct sigaction *action,
|
|||
struct qemu_signalfd_siginfo *info);
|
||||
#endif
|
||||
|
||||
int qemu_mprotect_rw(void *addr, size_t size);
|
||||
int qemu_mprotect_rwx(void *addr, size_t size);
|
||||
int qemu_mprotect_none(void *addr, size_t size);
|
||||
|
||||
/*
|
||||
* Don't introduce new usage of this function, prefer the following
|
||||
* qemu_open/qemu_create that take an "Error **errp"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue