get_tid

iget_tid

Outline

Reference task ID in the RUNNING state.

C format

 ER      get_tid ( ID *p_tskid );
 
 ER      iget_tid ( ID *p_tskid );


Assembly format

 SUBW    SP, #0x06
 MOVW    [SP+0x02], AX
 MOVW    AX, BC
 MOVW    [SP+0x04], AX
 MOVW    AX, SP
 CALL    !!_get_tid
 
 SUBW    SP, #0x06
 MOVW    [SP+0x02], AX
 MOVW    AX, BC
 MOVW    [SP+0x04], AX
 MOVW    AX, SP
 CALL    !!_iget_tid


Parameter(s)

I/O

Parameter

Description

O

 ID      *p_tskid;
ID number of the task in the RUNNING state.



Explanation

These service calls store the ID of a task in the RUNNING state in the area specified by parameter p_tskid.

Note This service call stores TSK_NONE in the area specified by parameter p_tskid if no tasks that have entered the RUNNING state exist (all tasks in the IDLE state).

Return value

Macro

Value

Description

E_OK

0

Normal completion.