提交 cab1b4bd 编写于 作者: R Riku Voipio 提交者: Aurelien Jarno

fix locking error with current_tb

Signed-off-by: NRiku Voipio <riku.voipio@nokia.com>
上级 da79030f
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册