Everything

ref_mtx

iref_mtx

Outline
Reference mutex state.
C format
 ER      ref_mtx (ID mtxid, T_RMTX *pk_rmtx);
 ER      iref_mtx (ID mtxid, T_RMTX *pk_rmtx);
Parameter(s)
I/O
Parameter
Description
I
 ID      mtxid;
ID number of the mutex to be referenced.
O
 T_RMTX  *pk_rmtx;
Pointer to the packet returning the mutex state.

[Mutex state packet: T_RMTX]
 typedef struct  t_rmtx {
     ID      htskid;         /*Existence of locked mutex*/
     ID      wtskid;         /*Existence of waiting task*/
     ATR     mtxatr;         /*Attribute*/
     PRI     ceilpri;        /*Reserved for future use*/
 } T_RMTX;

Explanation
The service calls store the detailed information of the mutex specified by parameter mtxid (existence of locked mutexes, waiting tasks, etc.) into the area specified by parameter pk_rmtx.
Note For details about the mutex state packet, refer to "15.2.8 Mutex state packet".
Return value
Macro
Value
Description
E_OK
0
Normal completion.
E_ID
-18
Invalid ID number.
- mtxid < 0x0
- mtxid > Maximum ID number
E_CTX
-25
Context error.
- This service call was issued in the CPU locked state.
E_NOEXS
-42
Non-existent object.
- Specified mutex is not registered.