Commit 8efb62d5 authored by Tomasz Wlostowski's avatar Tomasz Wlostowski Committed by Tristan Gingold

lib/wrc-task: make WRC_MAX_TASKS overridable by BSPs

parent 6b4ef79c
...@@ -6,7 +6,11 @@ ...@@ -6,7 +6,11 @@
#ifndef __WRC_TASK_H__ #ifndef __WRC_TASK_H__
#define __WRC_TASK_H__ #define __WRC_TASK_H__
#define WRC_MAX_TASKS 20 #include <board.h>
#ifndef WRC_MAX_TASKS
# define WRC_MAX_TASKS 20
#endif
/* /*
* A task is a data structure, but currently suboptimal. * A task is a data structure, but currently suboptimal.
......
...@@ -92,8 +92,9 @@ struct wrc_task* wrc_task_create( const char *name, void (*init)(void), int (*jo ...@@ -92,8 +92,9 @@ struct wrc_task* wrc_task_create( const char *name, void (*init)(void), int (*jo
t = &tasks[i]; t = &tasks[i];
break; break;
} }
if(!t) { if(!t)
pp_printf("Task %s not created!\n", name); {
main_dbg("wrc_task_create() failed due to too many tasks (%d)\n", WRC_MAX_TASKS);
return NULL; return NULL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment