tk_get_reg

Get Task Registers

[C Language Interface]

ER ercd = tk_get_reg ( ID tskid, T_REGS *pk_regs, T_EIT *pk_eit, T_CREGS *pk_cregs ) ;

[Parameters]

ID tskid Task ID

[Return Parameters]

T_REGS pk_regs General registers

T_EIT pk_eit Registers saved when EIT occurs

T_CREGS pk_cregs Control registers

ER ercd Error code

The contents of T_REGS, T_EIT, and T_CREGS are defined for each CPU and implementation.

[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_OBJ Invalid object state (called for the invoking task)

E_CTX Context error (called from task-independent portion)

[Description]

Gets the current register contents of the task specified in tskid.

If NULL is set in pk_regs, pk_eit, or pk_cregs, the corresponding registers are not referenced.

The referenced register values are not necessarily the values at the time the task portion was executing.

If this system call is issued for the invoking task, error code E_OBJ is returned.

[Additional Notes]

In principle, all registers in the task context can be referenced. This includes not only physical CPU registers but also those treated by the OS as virtual registers.

Comments