microkernel: put _k_task_list into its own binary section

The _k_task_list was a static array generated by sysgen,
where it containing all pre-defined tasks from MDEF file.
To support private task objects (aka, defining tasks within
source files), the task list has to accommodate tasks that
are not only processed through sysgen, but also those defined
within source files.

This is done by creating a new section in binary, and all task
objects go into this section. By doing this, the task list
can still be manipulated as an array, which is required for
task group operation.

Change-Id: I799d6967567079498bc414e0cb809e8af856b53e
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2015-07-23 17:17:40 -07:00 committed by Anas Nashif
commit 75e5427e15
5 changed files with 49 additions and 31 deletions

View file

@ -42,6 +42,8 @@
#include <nano_private.h>
#include <start_task_arch.h>
extern struct k_proc _k_task_list_start[];
extern struct k_proc _k_task_list_end[];
/**
*
@ -385,7 +387,6 @@ void _k_task_group_op(struct k_args *A)
{
ktask_group_t grp = A->Args.g1.group;
int opt = A->Args.g1.opt;
int i;
struct k_proc *X;
#ifdef CONFIG_TASK_DEBUG
@ -395,7 +396,7 @@ void _k_task_group_op(struct k_args *A)
_k_debug_halt = 0;
#endif
for (i = 0, X = _k_task_list; i < _k_task_count; i++, X++) {
for (X = _k_task_list_start; X < _k_task_list_end; X++) {
if (X->Group & grp) {
switch (opt) {
case TASK_GROUP_START: