Fixed hang when vectoring to another address with no Gecko plugged in

due to IRQ trap
This commit is contained in:
John Kelley 2009-05-09 15:13:47 -07:00 committed by bushing
parent 5b4ebdf739
commit 48109e684b

14
ipc.c
View File

@ -340,17 +340,19 @@ u32 ipc_process_slow(void)
u32 vector = 0; u32 vector = 0;
while (!vector) { while (!vector) {
while (slow_queue_head != slow_queue_tail) { while (!vector && (slow_queue_head != slow_queue_tail)) {
vector = process_slow(&slow_queue[slow_queue_head]); vector = process_slow(&slow_queue[slow_queue_head]);
slow_queue_head = (slow_queue_head+1)&(IPC_SLOW_SIZE-1); slow_queue_head = (slow_queue_head+1)&(IPC_SLOW_SIZE-1);
} }
u32 cookie = irq_kill(); if (!vector)
if(slow_queue_head == slow_queue_tail) {
irq_wait(); u32 cookie = irq_kill();
irq_restore(cookie); if(slow_queue_head == slow_queue_tail)
irq_wait();
irq_restore(cookie);
}
} }
return vector; return vector;
} }