diff options
author | Riku Voipio <riku.voipio@nokia.com> | 2010-01-20 12:56:27 +0200 |
---|---|---|
committer | Riku Voipio <riku.voipio@nokia.com> | 2010-02-05 14:50:58 +0200 |
commit | 26bc95a037ef5e65afacc89082725a34ba23fdbd (patch) | |
tree | 90f51247535f6c007f76f4e8d4624455e8f48015 | |
parent | c4ab7899f273d602086ea231c8e200b64a0da7ce (diff) | |
download | hqemu-26bc95a037ef5e65afacc89082725a34ba23fdbd.zip hqemu-26bc95a037ef5e65afacc89082725a34ba23fdbd.tar.gz |
fix locking error with current_tb
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
-rw-r--r-- | exec.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1537,15 +1537,15 @@ static void cpu_unlink_tb(CPUState *env) TranslationBlock *tb; static spinlock_t interrupt_lock = SPIN_LOCK_UNLOCKED; + spin_lock(&interrupt_lock); tb = env->current_tb; /* if the cpu is currently executing code, we must unlink it and all the potentially executing TB */ if (tb) { - spin_lock(&interrupt_lock); env->current_tb = NULL; tb_reset_jump_recursive(tb); - spin_unlock(&interrupt_lock); } + spin_unlock(&interrupt_lock); } /* mask must never be zero, except for A20 change call */ |