freemyipod r596 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r595‎ | r596 | r597 >
Date:21:37, 12 February 2011
Author:theseven
Status:new
Tags:
Comment:
emCORE: If an IRQ while we are sleeping causes a wakeup to be signalled, for which a thread is waiting, don't go to sleep after handling the IRQ but switch to the woken up thread instead
Modified paths:
  • /emcore/trunk/thread.c (modified) (history)

Diff [purge]

Index: emcore/trunk/thread.c
@@ -204,6 +204,8 @@
205205 obj->waiter->blocked_by = NULL;
206206 obj->waiter->timeout = 0;
207207 ret = THREAD_FOUND;
 208+ if (current_thread == &idle_thread)
 209+ scheduler_switch(obj->waiter, NULL);
208210 }
209211
210212 leave_critical_section(mode);