提交 4f8eb8da 编写于 作者: B balrog

Work around a crash when timer signal occurs before main loop, original patch by 武田 俊也.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3820 c046a42c-6fe2-441c-8c8c-71466251a162
上级 bd464c2e
...@@ -332,8 +332,6 @@ struct pxa2xx_keypad_s *pxa27x_keypad_init(target_phys_addr_t base, ...@@ -332,8 +332,6 @@ struct pxa2xx_keypad_s *pxa27x_keypad_init(target_phys_addr_t base,
void pxa27x_register_keypad(struct pxa2xx_keypad_s *kp, struct keymap *map, void pxa27x_register_keypad(struct pxa2xx_keypad_s *kp, struct keymap *map,
int size) int size)
{ {
kp->map = (struct keymap *) qemu_mallocz(sizeof(struct keymap) * size);
if(!map || size < 0x80) { if(!map || size < 0x80) {
fprintf(stderr, "%s - No PXA keypad map defined\n", __FUNCTION__); fprintf(stderr, "%s - No PXA keypad map defined\n", __FUNCTION__);
exit(-1); exit(-1);
......
...@@ -1186,13 +1186,15 @@ static void host_alarm_handler(int host_signum) ...@@ -1186,13 +1186,15 @@ static void host_alarm_handler(int host_signum)
#endif #endif
CPUState *env = next_cpu; CPUState *env = next_cpu;
/* stop the currently executing cpu because a timer occured */ if (env) {
cpu_interrupt(env, CPU_INTERRUPT_EXIT); /* stop the currently executing cpu because a timer occured */
cpu_interrupt(env, CPU_INTERRUPT_EXIT);
#ifdef USE_KQEMU #ifdef USE_KQEMU
if (env->kqemu_enabled) { if (env->kqemu_enabled) {
kqemu_cpu_interrupt(env); kqemu_cpu_interrupt(env);
} }
#endif #endif
}
event_pending = 1; event_pending = 1;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册