tk_get_cpr
Get Task Co-processor Registers
ER ercd = tk_get_cpr ( ID tskid, INT copno, T_COPREGS *pk_copregs ) ;
ID tskid Task ID
INT copno Co-processor number (0 to 3)
T_COPREGS pk copregs Co-processor registers
ER ercd Error code
typedef union {
T_COP0REG cop0; Co-processor number 0 register
T_COP1REG cop1; Co-processor number 1 register
T_COP2REG cop2; Co-processor number 2 register
T_COP3REG cop3; Co-processor number 3 register
} T_COPREG;
The contents of T COPn REG are defined for each CPU and implementation.
E_OK Normal completion
E_ID nvalid 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 Parameter error (copno is invalid or the specified co-processor does not exist)
Gets the current contents of the register specified in copno of the task specified in tskid.
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.
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