17.5 Static API Information
The following describes the format that must be observed when describing the static API information in the system configuration file.
The GOTHIC-FONT characters in following descriptions are the reserved words, and italic face characters are the portion that the user must write the relevant numeric value, symbol name, or keyword.
Items enclosed by square brackets "[ ]" can be omitted.
The number of items that can be defined as task information is limited to one for each ID number.
The following shows the task information format.
CRE_TSK (tskid, { tskatr, exinf, task, itskpri, stksz[:sec_nam], stk });
|
sec_nam
The items constituting the task information are as follows.
Specifies the ID number for a task.
A value from 0x1 to 0xff, or a name, can be specified for
tskid.
Note When a name is specified, the CF850V4 automatically assigns an ID number.
The CF850V4 outputs the relationship between a name and an ID number to the system information header file in the following format:
#define tskid value
Specifies the attribute for a task.
The keyword that can be specified for
tskatr is TA_HLNG, TA_ASM, TA_ACT, TA_DISPREEMPT, TA_ENAINT and TA_DISINT.
TA_HLNG: Start a task through a C language interface.
TA_ASM: Start a task through an assembly language interface.
[Initial activation state]
TA_ACT: Task is activated after the creation.
[Initial preemption state]
TA_DISPREEMPT: Preemption is disabled at task activation.
[Initial interrupt state]
Note 1 If specification of TA_ACT is omitted, the DORMANT state is specified as the initial activation state.
Note 2 If specification of TA_DISPREEMPT is omitted, preempt acceptance is enabled.
3 ) Extended information:
exinf
Specifies the extended information for a task.
A value from 0x0 to 0xffffffff, or a symbol name, can be specified for
exinf.
Note The target task can be manipulated by handling the extended information as if it were a function parameter.
Specifies the start address for a task.
A value from 0x0 to 0xfffffffe (aligned to a 2-byte boundary), or a symbol name, can be specified for
task.
Note When a task is coded as follows, the symbol name specified for
task should be func_task.
#include <kernel.h>
#include <kernel_id.h>
void
func_task ( VP_INT exinf )
{
............
............
ext_tsk ( );
}
|
5 ) Initial priority:
itskpri
6 ) Task stack size: stksz, memory area name:
sec_nam
Specifies the task stack size (unit: bytes) and the name of the memory area secured for the task stack.
Only 4-byte boundary values from 0x0 to 0x7ffffffc can be specified for
stksz, and only memory area name
sec_nam defined in
Memory area information" can be specified for
sec_nam.
Note 1 If specification of
sec_nam is omitted, the task stack is allocated to ".kernel_work" section.
Note 2 The stack size that is actually secured is calculated as the specified stack size plus "
ctxsz (size of context area of interrupt handler)". See
2 Task stack for details about
ctxsz.
7 ) Reserved for future use:
stk
System-reserved area.
Values that can be specified for
stk are limited to NULL characters.