tk_inf_tsk

Get Task Information

[C Language Interface]

ER ercd = tk_inf_tsk ( ID tskid, T_ITSK *pk_itsk, BOOL clr ) ;

[Parameters]

ID tskid Task ID

T_ITSK* pk itsk Address of packet for returning task information

BOOL clr Clear task information

[Return Parameters]

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.)

[Error Codes]

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)

[Description]

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.

[Additional Notes]

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