microkernel: remove kernel service dispatch table

This change removes the internal number-to-function mapping
of microkernel services. Instead, function pointers are used
to specify which service to use.

This is in preparation for private kernel objects. Before this,
only kernel objects that are defined in MDEF files would have
corresponding functions included in the final binary, via sysgen
by populating an array of number-to-function mapping. This
causes an issue when a certain type of objects are all defined
with source code, and never in MDEF file. The corresponding
mapping would be deleted, and the functions are never included
in the binary. For example, if no mutexes are defined in MDEF
file, the _k_mutex_*() functions would not be included.

With this change, any usage of private kernel objects will hint
to the linker that those functions are needed, and should not be
removed from final binary.

Change-Id: If48864abcd6471bcb7964ec00fe668bcabe3239b
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2015-07-25 15:31:09 -07:00 committed by Anas Nashif
commit 74c8852d05
22 changed files with 266 additions and 396 deletions

View file

@ -364,7 +364,7 @@ void _task_ioctl(ktask_t task, /* task on which to operate */
{
struct k_args A;
A.Comm = TSKOP;
A.Comm = _K_SVC_TASK_OP;
A.Args.g1.task = task;
A.Args.g1.opt = opt;
KERNEL_ENTRY(&A);
@ -435,7 +435,7 @@ void _task_group_ioctl(ktask_group_t group, /* task group */
{
struct k_args A;
A.Comm = GRPOP;
A.Comm = _K_SVC_TASK_GROUP_OP;
A.Args.g1.group = group;
A.Args.g1.opt = opt;
KERNEL_ENTRY(&A);
@ -530,7 +530,7 @@ void task_priority_set(ktask_t task, /* task whose priority is to be set */
{
struct k_args A;
A.Comm = SPRIO;
A.Comm = _K_SVC_TASK_PRIORITY_SET;
A.Args.g1.task = task;
A.Args.g1.prio = prio;
KERNEL_ENTRY(&A);
@ -573,7 +573,7 @@ void task_yield(void)
{
struct k_args A;
A.Comm = YIELD;
A.Comm = _K_SVC_TASK_YIELD;
KERNEL_ENTRY(&A);
}