freemyipod r344 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r343‎ | r344 | r345 >
Date:23:54, 19 December 2010
Author:theseven
Status:new
Tags:
Comment:
emBIOS: Only suspend threads that are actually used when a panic happens
Modified paths:
  • /embios/trunk/panic.c (modified) (history)

Diff [purge]

Index: embios/trunk/panic.c
@@ -42,8 +42,9 @@
4343 {
4444 int i;
4545 for (i = 0; i < MAX_THREADS; i++)
46 - if (scheduler_threads[i].type == USER_THREAD)
47 - scheduler_threads[i].state = THREAD_SUSPENDED;
 46+ if (scheduler_threads[i].state != THREAD_FREE)
 47+ if (scheduler_threads[i].type == USER_THREAD)
 48+ scheduler_threads[i].state = THREAD_SUSPENDED;
4849 }
4950 current_thread->state = THREAD_DEFUNCT_ACK;
5051 current_thread->block_type = THREAD_DEFUNCT_PANIC;