From a85044bf9eaa0a7206c1978d3cfd57ab2d7fae2f Mon Sep 17 00:00:00 2001 From: Miika Pekkarinen Date: Sat, 16 Sep 2006 16:18:11 +0000 Subject: 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 --- apps/plugins/battery_bench.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'apps/plugins/battery_bench.c') 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) struct { - int id; + struct thread_entry *id; bool ended; } s_thread; @@ -454,10 +454,11 @@ int main(void) rb->close(fd); } - rb->queue_init(&thread_q); /* put the thread's queue in the bcast list */ + rb->queue_init(&thread_q, true); /* put the thread's queue in the bcast list */ rb->memset(&s_thread, 0, sizeof(s_thread)); /* zero the struct */ if((s_thread.id = rb->create_thread(thread, thread_stack, - sizeof(thread_stack), "Battery Benchmark"))<0) + sizeof(thread_stack), "Battery Benchmark" + IF_PRIO(, PRIORITY_BACKGROUND))) == NULL) { rb->splash(HZ,true,"Cannot create thread!"); return PLUGIN_ERROR; -- cgit v1.2.3