diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2007-11-20 03:44:25 +0000 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2007-11-20 03:44:25 +0000 |
| commit | fadbf0a6f72540b025987a2b3df3f9edd4e3e411 (patch) | |
| tree | 173f1780a981ad3e37d1df626e31af1b93077b95 /apps/debug_menu.c | |
| parent | 31bf5cc8e5bf1e1c06e38829e29bf5da969d5c8e (diff) | |
| download | rockbox-fadbf0a6f72540b025987a2b3df3f9edd4e3e411.zip rockbox-fadbf0a6f72540b025987a2b3df3f9edd4e3e411.tar.gz rockbox-fadbf0a6f72540b025987a2b3df3f9edd4e3e411.tar.bz2 rockbox-fadbf0a6f72540b025987a2b3df3f9edd4e3e411.tar.xz | |
Make threads responsible for explicit cancellation of their own boosted status. Sleeping and timeouts will no longer cancel it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15709 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
| -rw-r--r-- | apps/debug_menu.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index e3f576d..a8eb786 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -124,16 +124,14 @@ static char thread_status_char(unsigned status) static char* threads_getname(int selected_item, void * data, char *buffer) { (void)data; + struct thread_entry *thread; char name[32]; - struct thread_entry *thread = NULL; - unsigned status; - int usage; #if NUM_CORES > 1 if (selected_item < (int)NUM_CORES) { - usage = idle_stack_usage(selected_item); - snprintf(buffer, MAX_PATH, "Idle (%d): %2d%%", selected_item, usage); + snprintf(buffer, MAX_PATH, "Idle (%d): %2d%%", selected_item, + idle_stack_usage(selected_item)); return buffer; } @@ -141,25 +139,26 @@ static char* threads_getname(int selected_item, void * data, char *buffer) #endif thread = &threads[selected_item]; - status = thread_get_status(thread); - - if (status == STATE_KILLED) + + if (thread->state == STATE_KILLED) { snprintf(buffer, MAX_PATH, "%2d: ---", selected_item); return buffer; } thread_get_name(name, 32, thread); - usage = thread_stack_usage(thread); snprintf(buffer, MAX_PATH, "%2d: " IF_COP("(%d) ") "%c%c " IF_PRIO("%d ") "%2d%% %s", selected_item, IF_COP(thread->core,) - (status == STATE_RUNNING) ? '*' : ' ', - thread_status_char(status), +#ifdef HAVE_SCHEDULER_BOOSTCTRL + (thread->boosted) ? '+' : +#endif + ((thread->state == STATE_RUNNING) ? '*' : ' '), + thread_status_char(thread->state), IF_PRIO(thread->priority,) - usage, name); + thread_stack_usage(thread), name); return buffer; } |