summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHristo Kovachev <bger@rockbox.org>2006-04-05 08:33:20 +0000
committerHristo Kovachev <bger@rockbox.org>2006-04-05 08:33:20 +0000
commit6eafd48cec1895c5426961c4a54d0e22d58deb4d (patch)
treed56722faa383ebb53697ea1ae121af2496b43f26
parent45f2df0eba7a3ffa633a709e13d3b871592d2fc6 (diff)
downloadrockbox-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
-rw-r--r--apps/plugins/battery_bench.c9
-rw-r--r--firmware/export/thread.h4
2 files changed, 9 insertions, 4 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)
rb->queue_init(&thread_q); /* put the thread's queue in the bcast list */
rb->memset(&s_thread, 0, sizeof(s_thread)); /* zero the struct */
- s_thread.id = rb->create_thread(thread, thread_stack,
- sizeof(thread_stack), "Battery Benchmark");
+ if((s_thread.id = rb->create_thread(thread, thread_stack,
+ sizeof(thread_stack), "Battery Benchmark"))<0)
+ {
+ rb->splash(HZ,true,"Cannot create thread!");
+ return PLUGIN_ERROR;
+ }
+
rb->plugin_tsr(exit_tsr);
return PLUGIN_OK;
diff --git a/firmware/export/thread.h b/firmware/export/thread.h
index da61d1a632..762e315a4c 100644
--- a/firmware/export/thread.h
+++ b/firmware/export/thread.h
@@ -22,9 +22,9 @@
#include <stdbool.h>
#if CONFIG_CODEC == SWCODEC
-#define MAXTHREADS 14
+#define MAXTHREADS 16
#else
-#define MAXTHREADS 9
+#define MAXTHREADS 11
#endif
#define DEFAULT_STACK_SIZE 0x400 /* Bytes */