mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
accel/tcg: Declare mmap_[un]lock() in 'exec/page-protection.h'
Move mmap_lock(), mmap_unlock() declarations and the WITH_MMAP_LOCK_GUARD() definition to 'exec/page-protection.h'. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20241212185341.2857-5-philmd@linaro.org>
This commit is contained in:
parent
edf3bce969
commit
487a31e0ac
7 changed files with 29 additions and 17 deletions
|
@ -27,7 +27,6 @@
|
|||
#endif
|
||||
#include "exec/mmu-access-type.h"
|
||||
#include "exec/translation-block.h"
|
||||
#include "qemu/clang-tsa.h"
|
||||
|
||||
/**
|
||||
* cpu_loop_exit_requested:
|
||||
|
@ -520,18 +519,6 @@ static inline tb_page_addr_t get_page_addr_code(CPUArchState *env,
|
|||
}
|
||||
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
void TSA_NO_TSA mmap_lock(void);
|
||||
void TSA_NO_TSA mmap_unlock(void);
|
||||
bool have_mmap_lock(void);
|
||||
|
||||
static inline void mmap_unlock_guard(void *unused)
|
||||
{
|
||||
mmap_unlock();
|
||||
}
|
||||
|
||||
#define WITH_MMAP_LOCK_GUARD() \
|
||||
for (int _mmap_lock_iter __attribute__((cleanup(mmap_unlock_guard))) \
|
||||
= (mmap_lock(), 0); _mmap_lock_iter == 0; _mmap_lock_iter = 1)
|
||||
|
||||
/**
|
||||
* adjust_signal_pc:
|
||||
|
@ -585,10 +572,6 @@ G_NORETURN void cpu_loop_exit_sigbus(CPUState *cpu, target_ulong addr,
|
|||
uintptr_t ra);
|
||||
|
||||
#else
|
||||
static inline void mmap_lock(void) {}
|
||||
static inline void mmap_unlock(void) {}
|
||||
#define WITH_MMAP_LOCK_GUARD()
|
||||
|
||||
void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1, ram_addr_t length);
|
||||
void tlb_reset_dirty_range_all(ram_addr_t start, ram_addr_t length);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue