cre_tsk
acre_tsk
ER cre_tsk (ID tskid, T_CTSK *pk_ctsk );
ER_ID acre_tsk ( T_CTSK *pk_ctsk );
The cre_tsk creates a task with task ID indicated by tskid according to the content of pk_ctsk. The acre_tsk creates a task
tskatr := ( TA_HLNG | [TA_ACT] | [TA_DOMdomid] )
- TA_ACT ( = 0x0002)
When the TA_ACT attribute is specified, the created task makes a transition to the READY state. The processing performed at task activation is shown in Table 19-3. When the TA_ACT attribute is not specified, the created task makes a transition to the DORMANT state.
When the TA_ACT attribute is specified, the created task makes a transition to the READY state. The processing performed at task activation is shown in Table 19-3. When the TA_ACT attribute is not specified, the created task makes a transition to the DORMANT state.
- TA_DOM(domid)
The created task belong to the domain indicated by domid. When 0 is specified for domid or TA_DOM(domid) is not specified, the created task belongs to the domain that the invoking task belong to.
The created task belong to the domain indicated by domid. When 0 is specified for domid or TA_DOM(domid) is not specified, the created task belongs to the domain that the invoking task belong to.
2 ) Extended information (exinf)
When the task is activated by TA_ACT attribute, act_tsk or iact_tsk, exinf is passed to the task as argument. And exinf is passed to the task exception handling routine. The exinf can be widely used by the user, for example, to set information concerning the task.
When the task is activated by TA_ACT attribute, act_tsk or iact_tsk, exinf is passed to the task as argument. And exinf is passed to the task exception handling routine. The exinf can be widely used by the user, for example, to set information concerning the task.
4 ) Task initial priority (itskpri)
Specify initial priority of the task for itskpri. Ranges of the value that can be specified are from 1 to TMAX_TPRI.
Specify initial priority of the task for itskpri. Ranges of the value that can be specified are from 1 to TMAX_TPRI.
5 ) User stack size (stksz), Start address of user stack (stk)
The application acquires user stack area, and specifies the start address for stk and the size for stksz.
The user stack area must satisfy the following.
The application acquires user stack area, and specifies the start address for stk and the size for stksz.
The user stack area must satisfy the following.
C ) The user stack area must not overwrap with either all user stacks and all memory objects. If not, an error is not detected and correct system operation cannot be guaranteed.
Note The mITRON4.0 specification defines the function that the kernel allocates user stack area when NULL is specified for stk. But RI600PX does not support this function.