summary refs log tree commit diff stats
path: root/include/qemu
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2022-02-08 20:08:53 +0000
committerPeter Maydell <peter.maydell@linaro.org>2022-02-21 13:30:20 +0000
commitf2241d16eaa142b4092b11ace48f2a0472bf4ad6 (patch)
treec9054274241f849364296f27cc04578bb22fd7a6 /include/qemu
parentb85ea5fa2f0bc281b9700a51ba69aebcc76b108c (diff)
downloadfocaccia-qemu-f2241d16eaa142b4092b11ace48f2a0472bf4ad6.tar.gz
focaccia-qemu-f2241d16eaa142b4092b11ace48f2a0472bf4ad6.zip
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
Diffstat (limited to 'include/qemu')
-rw-r--r--include/qemu/mprotect.h14
-rw-r--r--include/qemu/osdep.h4
2 files changed, 14 insertions, 4 deletions
diff --git a/include/qemu/mprotect.h b/include/qemu/mprotect.h
new file mode 100644
index 0000000000..1e83d1433e
--- /dev/null
+++ b/include/qemu/mprotect.h
@@ -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
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 5ebd737aeb..ca00899bbd 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -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"