diff options
author | KONRAD Frederic <fred.konrad@greensocs.com> | 2015-08-10 17:27:02 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-09-09 15:34:55 +0200 |
commit | 677ef6230b603571ae05125db469f7b4c8912a77 (patch) | |
tree | 93ee681232b120a132590ef8e456809b0c9e3a18 /target-i386/cpu.h | |
parent | d5f8d61390de8f2acc0da93f184e421a709cb503 (diff) | |
download | hqemu-677ef6230b603571ae05125db469f7b4c8912a77.zip hqemu-677ef6230b603571ae05125db469f7b4c8912a77.tar.gz |
replace spinlock by QemuMutex.
spinlock is only used in two cases:
* cpu-exec.c: to protect TranslationBlock
* mem_helper.c: for lock helper in target-i386 (which seems broken).
It's a pthread_mutex_t in user-mode, so we can use QemuMutex directly,
with an #ifdef. The #ifdef will be removed when multithreaded TCG
will need the mutex as well.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Message-Id: <1439220437-23957-5-git-send-email-fred.konrad@greensocs.com>
Signed-off-by: Emilio G. Cota <cota@braap.org>
[Merge Emilio G. Cota's patch to remove volatile. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target-i386/cpu.h')
-rw-r--r-- | target-i386/cpu.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 74b674d..0337838 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -1318,6 +1318,9 @@ static inline MemTxAttrs cpu_get_mem_attrs(CPUX86State *env) void cpu_set_mxcsr(CPUX86State *env, uint32_t val); void cpu_set_fpuc(CPUX86State *env, uint16_t val); +/* mem_helper.c */ +void helper_lock_init(void); + /* svm_helper.c */ void cpu_svm_check_intercept_param(CPUX86State *env1, uint32_t type, uint64_t param); |