diff options
author | Hristo Kovachev <bger@rockbox.org> | 2006-04-05 08:33:20 +0000 |
---|---|---|
committer | Hristo Kovachev <bger@rockbox.org> | 2006-04-05 08:33:20 +0000 |
commit | 6eafd48cec1895c5426961c4a54d0e22d58deb4d (patch) | |
tree | d56722faa383ebb53697ea1ae121af2496b43f26 /apps | |
parent | 45f2df0eba7a3ffa633a709e13d3b871592d2fc6 (diff) | |
download | rockbox-6eafd48cec1895c5426961c4a54d0e22d58deb4d.tar.gz rockbox-6eafd48cec1895c5426961c4a54d0e22d58deb4d.zip |
Fix bug #5037, spotted by David Rothenberger, also increase the max threads' count by 2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9512 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/battery_bench.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c index 8572932767..918853c9ab 100644 --- a/apps/plugins/battery_bench.c +++ b/apps/plugins/battery_bench.c | |||
@@ -442,8 +442,13 @@ int main(void) | |||
442 | 442 | ||
443 | rb->queue_init(&thread_q); /* put the thread's queue in the bcast list */ | 443 | rb->queue_init(&thread_q); /* put the thread's queue in the bcast list */ |
444 | rb->memset(&s_thread, 0, sizeof(s_thread)); /* zero the struct */ | 444 | rb->memset(&s_thread, 0, sizeof(s_thread)); /* zero the struct */ |
445 | s_thread.id = rb->create_thread(thread, thread_stack, | 445 | if((s_thread.id = rb->create_thread(thread, thread_stack, |
446 | sizeof(thread_stack), "Battery Benchmark"); | 446 | sizeof(thread_stack), "Battery Benchmark"))<0) |
447 | { | ||
448 | rb->splash(HZ,true,"Cannot create thread!"); | ||
449 | return PLUGIN_ERROR; | ||
450 | } | ||
451 | |||
447 | rb->plugin_tsr(exit_tsr); | 452 | rb->plugin_tsr(exit_tsr); |
448 | 453 | ||
449 | return PLUGIN_OK; | 454 | return PLUGIN_OK; |