Revision ee8b7021 exec.c
b/exec.c | ||
---|---|---|
260 | 260 |
nb_tbs, |
261 | 261 |
nb_tbs > 0 ? (code_gen_ptr - code_gen_buffer) / nb_tbs : 0); |
262 | 262 |
#endif |
263 |
/* must reset current TB so that interrupts cannot modify the |
|
264 |
links while we are modifying them */ |
|
265 |
env->current_tb = NULL; |
|
266 |
|
|
267 | 263 |
nb_tbs = 0; |
268 | 264 |
for(i = 0;i < CODE_GEN_HASH_SIZE; i++) |
269 | 265 |
tb_hash[i] = NULL; |
... | ... | |
970 | 966 |
void cpu_interrupt(CPUState *env, int mask) |
971 | 967 |
{ |
972 | 968 |
TranslationBlock *tb; |
969 |
static int interrupt_lock; |
|
973 | 970 |
|
974 | 971 |
env->interrupt_request |= mask; |
975 | 972 |
/* if the cpu is currently executing code, we must unlink it and |
976 | 973 |
all the potentially executing TB */ |
977 | 974 |
tb = env->current_tb; |
978 |
if (tb) { |
|
975 |
if (tb && !testandset(&interrupt_lock)) { |
|
976 |
env->current_tb = NULL; |
|
979 | 977 |
tb_reset_jump_recursive(tb); |
978 |
interrupt_lock = 0; |
|
980 | 979 |
} |
981 | 980 |
} |
982 | 981 |
|
... | ... | |
998 | 997 |
|
999 | 998 |
#if !defined(CONFIG_USER_ONLY) |
1000 | 999 |
|
1001 |
void tlb_flush(CPUState *env) |
|
1000 |
/* NOTE: if flush_global is true, also flush global entries (not |
|
1001 |
implemented yet) */ |
|
1002 |
void tlb_flush(CPUState *env, int flush_global) |
|
1002 | 1003 |
{ |
1003 | 1004 |
int i; |
1004 | 1005 |
|
... | ... | |
1293 | 1294 |
|
1294 | 1295 |
#else |
1295 | 1296 |
|
1296 |
void tlb_flush(CPUState *env) |
|
1297 |
void tlb_flush(CPUState *env, int flush_global)
|
|
1297 | 1298 |
{ |
1298 | 1299 |
} |
1299 | 1300 |
|
Also available in: Unified diff