From 48109e684b81551b195152b344b15faa6235b8af Mon Sep 17 00:00:00 2001 From: John Kelley Date: Sat, 9 May 2009 15:13:47 -0700 Subject: [PATCH] Fixed hang when vectoring to another address with no Gecko plugged in due to IRQ trap --- ipc.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ipc.c b/ipc.c index bac11ae..6fd8390 100644 --- a/ipc.c +++ b/ipc.c @@ -340,17 +340,19 @@ u32 ipc_process_slow(void) u32 vector = 0; 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]); slow_queue_head = (slow_queue_head+1)&(IPC_SLOW_SIZE-1); } - u32 cookie = irq_kill(); - if(slow_queue_head == slow_queue_tail) - irq_wait(); - irq_restore(cookie); + if (!vector) + { + u32 cookie = irq_kill(); + if(slow_queue_head == slow_queue_tail) + irq_wait(); + irq_restore(cookie); + } } - return vector; }