diff options
-rw-r--r-- | apps/plugins/battery_bench.c | 9 | ||||
-rw-r--r-- | firmware/export/thread.h | 4 |
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) | |||
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; |
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 @@ | |||
22 | #include <stdbool.h> | 22 | #include <stdbool.h> |
23 | 23 | ||
24 | #if CONFIG_CODEC == SWCODEC | 24 | #if CONFIG_CODEC == SWCODEC |
25 | #define MAXTHREADS 14 | 25 | #define MAXTHREADS 16 |
26 | #else | 26 | #else |
27 | #define MAXTHREADS 9 | 27 | #define MAXTHREADS 11 |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | #define DEFAULT_STACK_SIZE 0x400 /* Bytes */ | 30 | #define DEFAULT_STACK_SIZE 0x400 /* Bytes */ |