td_get_reg

Get Task Register

[C Language Interface]

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

[Parameters]

ID tskid Task ID (TSK_SELF cannot be designated)

[Return Parameters]

T_REGS pk_regs General register

T_EIT pk_eit Registers saved when exception is raised

T_CREGS pk_cregs Control register

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 designated in tskid does not exist)

E_OBJ Invalid object state (issued for current RUN state task)

[Description]

Gets the register values of the task designated in tskid. This is similar to tk_get_reg.

Registers cannot be referenced for the task currently in RUN state. Except when a task-independent portion is executing, the current RUN state task is the invoking task.

When NULL is designated for regs, eit, or cregs, the corresponding register is not referenced.

The contents of T_REGS, T_EIT, and T_CREGS are implementation-dependent.

Comments