
CHAPTER 13 SERVICE CALLS
User’s Manual U14833EJ2V0UM
120
stksz
Specifies the size of the stack area used by the task. When task creation processing is performed, the kernel
secures a stack area from the stack pool based on this size specification. Failure to secure this area results in an
error, and the error code E_NOMEM is returned.
Note that because the kernel augments this area with items such as context size, the size of the area actually
secured from the stack pool is larger than the specified value. For further details, refer to the
RX4000
(
μ
ITRON4.0) Instruction User’s Manual (U14834E)
.
stk
This field specifies the top address of the stack area used by the task to be created. However, because this
function is not supported in the RX4000, stk should always be set to NULL. Settings other than NULL are
ignored.
gp
Sets the base address (gp) of the PID (Position Independent Data) used by the task to be created. If PID is not
used by the task, set gp to NULL.
tp
Reserved area. tp should always be set to NULL. Settings other than NULL are ignored.
[Differences from
μ
ITRON3.0]
1.
The values of the macros TA_ASM and TA_HLNG used when specifying the task attribute have been reversed
(TA_ASM 0
→
1, TA_HLNG 1
→
0). Caution is therefore required when porting task programs in which values
are directly specified without using a macro from
μ
ITRON3.0 to
μ
ITRON4.0.
TA_ACT has been added to the task attributes.
It is no longer necessary to use an attribute to specify the use of PID by a task.
stk has been added to the task creation packet (T_CTSK) members.
2.
3.
4.
[Return values]
Symbol
Value
Meaning
E_OK
0
Normal termination
E_RSFN
10
cre_tsk is not included in the system
E_RSATR
11
The task attribute is illegal
TA_COP was specified in the FPU disabled mode
An attribute that does not exist in the specifications was specified
E_PAR
17
The parameter is illegal
The initial priority is outside the range
(itskpri
≤
0, maximum priority value < itskpri)
E_ID
18
The task ID number is outside the range
(tskid
≤
0, maximum task count < tskid)
E_CTX
25
cre_tsk was issued from a non-task context
cre_tsk was issued in the CPU lock state
E_NOMEM
33
A stack of the requested size cannot be secured
E_OBJ
41
A task with the same ID number already exists