tk_set_reg

Set Task Registers

[C Language Interface]

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

[Parameters]

ID tskid ask ID

T_REGS k regs eneral registers

T_EIT k eit egisters saved when EIT occurs

T_CREGS k cregs ontrol registers

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

[Return Parameters]

ER rcd rror code

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

E_PAR Invalid register value (implementation-dependent)

[Description]

Sets 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 set register values are not necessarily the values while the task portion is executing. The OS is not aware of the e.ects of register value changes. It is possible, however, that some registers or register bits cannot be changed if the OS does not allow such changes (implementation-dependent).

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

Comments