summary refs log tree commit diff stats
path: root/linux-user/user-mmap.h
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-01-16 17:33:13 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-03-09 14:54:32 +0100
commit1405d7e60d8c98a28b29885f70da4f2e4407fbc6 (patch)
treed3c6195b307466b0dd7ee4d0125a3b6513712b86 /linux-user/user-mmap.h
parent84d66261bef3cdfea3bd1fb052a7ba38abb34b18 (diff)
downloadfocaccia-qemu-1405d7e60d8c98a28b29885f70da4f2e4407fbc6.tar.gz
focaccia-qemu-1405d7e60d8c98a28b29885f70da4f2e4407fbc6.zip
user: Extract common MMAP API to 'user/mmap.h'
Keep common MMAP-related declarations in a single place.

Note, this disable ThreadSafetyAnalysis on Linux for:
- mmap_fork_start()
- mmap_fork_end().

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250308122842.76377-4-philmd@linaro.org>
Diffstat (limited to 'linux-user/user-mmap.h')
-rw-r--r--linux-user/user-mmap.h19
1 files changed, 2 insertions, 17 deletions
diff --git a/linux-user/user-mmap.h b/linux-user/user-mmap.h
index b94bcdcf83..dfc4477a72 100644
--- a/linux-user/user-mmap.h
+++ b/linux-user/user-mmap.h
@@ -18,6 +18,8 @@
 #ifndef LINUX_USER_USER_MMAP_H
 #define LINUX_USER_USER_MMAP_H
 
+#include "user/mmap.h"
+
 /*
  * Guest parameters for the ADDR_COMPAT_LAYOUT personality
  * (at present this is the only layout supported by QEMU).
@@ -39,24 +41,7 @@
 extern abi_ulong task_unmapped_base;
 extern abi_ulong elf_et_dyn_base;
 
-/*
- * mmap_next_start: The base address for the next mmap without hint,
- * increased after each successful map, starting at task_unmapped_base.
- * This is an optimization within QEMU and not part of ADDR_COMPAT_LAYOUT.
- */
-extern abi_ulong mmap_next_start;
-
-int target_mprotect(abi_ulong start, abi_ulong len, int prot);
-abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
-                     int flags, int fd, off_t offset);
-int target_munmap(abi_ulong start, abi_ulong len);
-abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
-                       abi_ulong new_size, unsigned long flags,
-                       abi_ulong new_addr);
 abi_long target_madvise(abi_ulong start, abi_ulong len_in, int advice);
-abi_ulong mmap_find_vma(abi_ulong, abi_ulong, abi_ulong);
-void mmap_fork_start(void);
-void mmap_fork_end(int child);
 
 abi_ulong target_shmat(CPUArchState *cpu_env, int shmid,
                        abi_ulong shmaddr, int shmflg);