Download RI850V4 Real-Time Operating System User`s Manual: Coding

Transcript
RI850V4 Ver.1.00.00
CHAPTER 17 SERVICE CALLS
ref_tst
iref_tst
Outline
Reference task state (simplified version).
C format
ER
ER
ref_tst (ID tskid, T_RTST *pk_rtst);
iref_tst (ID tskid, T_RTST *pk_rtst);
Parameter(s)
I/O
Parameter
Description
ID number of the task to be referenced.
I
ID
tskid;
TSK_SELF:
Value:
O
T_RTST
*pk_rtst;
Pointer to the packet returning the task state.
Invoking task.
ID number of the task to be referenced.
[Task state packet (simplified version): T_RTST]
typedef struct t_rtst {
STAT
tskstat;
STAT
tskwait;
} T_RTST;
/*Current state*/
/*Reason for waiting*/
Explanation
Stores task state packet (current state, reason for waiting) of the task specified by parameter tskid in the area specified
by parameter pk_rtst.
Used for referencing only the current state and reason for wait among task information.
Response becomes faster than using ref_tsk or iref_tsk because only a few information items are acquired.
Note
For details about the task state packet (simplified version), refer to "16.2.2 Task state packet (simplified
version)".
Return value
Macro
E_OK
Value
0
R20UT0515EJ0100 Rev.1.00
Apr 01, 2011
Description
Normal completion.
Page 219 of 406