diff --git a/qemu/include/exec/exec-all.h b/qemu/include/exec/exec-all.h index bc0d84de..8762a818 100644 --- a/qemu/include/exec/exec-all.h +++ b/qemu/include/exec/exec-all.h @@ -371,11 +371,17 @@ void tlb_fill(CPUState *cpu, target_ulong addr, int is_write, int mmu_idx, #endif #if defined(CONFIG_USER_ONLY) +void mmap_lock(void); +void mmap_unlock(void); + static inline tb_page_addr_t get_page_addr_code(CPUArchState *env1, target_ulong addr) { return addr; } #else +static inline void mmap_lock(void) {} +static inline void mmap_unlock(void) {} + /* cputlb.c */ tb_page_addr_t get_page_addr_code(CPUArchState *env1, target_ulong addr); #endif diff --git a/qemu/include/qemu-common.h b/qemu/include/qemu-common.h index bef8ef5c..4a50b728 100644 --- a/qemu/include/qemu-common.h +++ b/qemu/include/qemu-common.h @@ -162,6 +162,9 @@ int qemu_strnlen(const char *s, int max_len); * Returns: the pointer originally in @input. */ char *qemu_strsep(char **input, const char *delim); +int qemu_strtol(const char *nptr, const char **endptr, int base, + long *result); + /* * strtosz() suffixes used to specify the default treatment of an diff --git a/qemu/translate-all.c b/qemu/translate-all.c index 1e0a6e86..2bf73769 100644 --- a/qemu/translate-all.c +++ b/qemu/translate-all.c @@ -456,11 +456,6 @@ static inline PageDesc *page_find(struct uc_struct *uc, tb_page_addr_t index) return page_find_alloc(uc, index, 0); } -#if !defined(CONFIG_USER_ONLY) -#define mmap_lock() do { } while (0) -#define mmap_unlock() do { } while (0) -#endif - #if defined(CONFIG_USER_ONLY) /* Currently it is not recommended to allocate big chunks of data in user mode. It will change when a dedicated libc will be used. */