tk_inf_tsk
Get Task Information
ER ercd = tk_inf_tsk ( ID tskid, T_ITSK *pk_itsk, BOOL clr ) ;
ID tskid Task ID
T_ITSK* pk itsk Address of packet for returning task information
BOOL clr Clear task information
ER ercd Error code
pk itsk detail:
RELTIM stime Cumulative system-level run time (ms)
RELTIM utime Cumulative user-level run time (ms)
(Other implementation-dependent parameters may be added beyond this point.)
E_OK Normal completion
E_ID Invalid ID number (tskid is invalid or cannot be used)
E_NOEXS Object does not exist (the task specified in tskid does not exist)
E_PAR Parameter error (the return parameter packet address cannot be used)
Gets statistical information for the task specified in tskid.
If clr = TRUE = 0, the cumulative information is reset (cleared to 0) after getting the information.
The invoking task can be specified by setting tskid = TSK_SELF = 0. Note, however, that when a system call is issued from a task-independent portion and tskid = TSK_SELF = 0 is specified, error code E_ID is returned.
The system-level run time is that while running at TA_RNG0, and the user-level run time is that while running at protection levels other than TA_RNG0. A task created to run at TA_RNG0 is therefore counted entirely as system-level run time.
The method of counting run time is implementation-dependent, but does not need to be especially precise. In fact, applications should not expect very high precision.

Comments