summaryrefslogtreecommitdiff
path: root/apps/plugins/battery_bench.c
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2006-09-16 16:18:11 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2006-09-16 16:18:11 +0000
commita85044bf9eaa0a7206c1978d3cfd57ab2d7fae2f (patch)
treea30695ed540bf32365d577f46398f712c7a494c4 /apps/plugins/battery_bench.c
parentbaf5494341cdd6cdb9590e21d429920b9bc4a2c6 (diff)
downloadrockbox-a85044bf9eaa0a7206c1978d3cfd57ab2d7fae2f.tar.gz
rockbox-a85044bf9eaa0a7206c1978d3cfd57ab2d7fae2f.zip
New scheduler, with priorities for swcodec platforms. Frequent task
switching should be more efficient and tasks are stored in linked lists to eliminate unnecessary task switching to improve performance. Audio should no longer skip on swcodec targets caused by too CPU hungry UI thread or background threads. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10958 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/battery_bench.c')
-rw-r--r--apps/plugins/battery_bench.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c
index 9400bd2018..3c56f84309 100644
--- a/apps/plugins/battery_bench.c
+++ b/apps/plugins/battery_bench.c
@@ -102,7 +102,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
102 102
103struct 103struct
104{ 104{
105 int id; 105 struct thread_entry *id;
106 bool ended; 106 bool ended;
107} s_thread; 107} s_thread;
108 108
@@ -454,10 +454,11 @@ int main(void)
454 rb->close(fd); 454 rb->close(fd);
455 } 455 }
456 456
457 rb->queue_init(&thread_q); /* put the thread's queue in the bcast list */ 457 rb->queue_init(&thread_q, true); /* put the thread's queue in the bcast list */
458 rb->memset(&s_thread, 0, sizeof(s_thread)); /* zero the struct */ 458 rb->memset(&s_thread, 0, sizeof(s_thread)); /* zero the struct */
459 if((s_thread.id = rb->create_thread(thread, thread_stack, 459 if((s_thread.id = rb->create_thread(thread, thread_stack,
460 sizeof(thread_stack), "Battery Benchmark"))<0) 460 sizeof(thread_stack), "Battery Benchmark"
461 IF_PRIO(, PRIORITY_BACKGROUND))) == NULL)
461 { 462 {
462 rb->splash(HZ,true,"Cannot create thread!"); 463 rb->splash(HZ,true,"Cannot create thread!");
463 return PLUGIN_ERROR; 464 return PLUGIN_ERROR;