Revision 15a51156 exec.c
b/exec.c | ||
---|---|---|
1215 | 1215 |
void cpu_interrupt(CPUState *env, int mask) |
1216 | 1216 |
{ |
1217 | 1217 |
TranslationBlock *tb; |
1218 |
static int interrupt_lock;
|
|
1218 |
static spinlock_t interrupt_lock = SPIN_LOCK_UNLOCKED;
|
|
1219 | 1219 |
|
1220 | 1220 |
env->interrupt_request |= mask; |
1221 | 1221 |
/* if the cpu is currently executing code, we must unlink it and |
... | ... | |
1224 | 1224 |
if (tb && !testandset(&interrupt_lock)) { |
1225 | 1225 |
env->current_tb = NULL; |
1226 | 1226 |
tb_reset_jump_recursive(tb); |
1227 |
interrupt_lock = 0;
|
|
1227 |
resetlock(&interrupt_lock);
|
|
1228 | 1228 |
} |
1229 | 1229 |
} |
1230 | 1230 |
|
Also available in: Unified diff