ref_tex

iref_tex

Outline

Reference task exception state.

C format

 ER      ref_tex (ID tskid, T_RTEX *pk_rtex);
 ER      iref_tex (ID tskid, T_RTEX *pk_rtex);
Parameter(s)

I/O

Parameter

Description

I

 ID      tskid;
ID number of the task.

TSK_SELF: Invoking task.

Value: ID number of the task.

O

 T_RTEX  *pk_rtex;
Pointer to the packet returning the task exception state.



[Task exception state packet: T_RTEX]

 typedef struct  t_rtex {
     STAT    texstat;        /*Task exception handling state*/
     UINT    pndptn;         /*Pending exception code*/
 } T_RTEX;


Explanation

Stores task exception state of the task specified by parameter tskid in the area specified by parameter pk_rtex.

- tskstat
Stores task exception handling state.

TTEX_ENA: Task exception enabled state

TTEX_DIS: Task exception disabled state

- pndptn
Stores the pending exception code.

Return value

Macro

Value

Description

E_OK

0

Normal completion.

E_PAR

-17

Parameter error.

- pk_rtex == NULL

E_ID

-18

Invalid ID number.

- tskid < 0

- tskid > VTMAX_TSK

- When this service call was issued from a non-task, TSK_SELF was specified for tskid.

E_CTX

-25

Context error.

- This service call was issued in the CPU locked state.

- This service call was issued in the status "PSW.IPL > kernel interrupt mask level".

Note When the iref_tex is issued from task or the ref_tex is issued from non-task, the context error is not detected and normal operation of the system is not guaranteed.

E_MACV

-26

Memory access violation. (only for ref_tex)

- The operand-write access to the area indicated by pk_rtex has not been permitted to the invoking task.

E_NOEXS

-42

Non-existent object.

- The task specified by tskid does not exist.