Everything

ref_sem

Outline
Reference semaphore state.
C format
 ER      ref_sem ( ID semid, T_RSEM *pk_rsem );

Assembly format
 MOVW    BC, #LOWW(_pk_rsem)
 MOV     A, #semid
 CALL    !!_ref_sem

Parameter(s)
I/O
Parameter
Description
I
 ID      semid;
ID number of the semaphore to be referenced.
O
 T_RSEM  *pk_rsem;
Pointer to the packet returning the semaphore state.

Explanation
Stores semaphore state packet (such as existence of waiting tasks) of the semaphore specified by parameter semid in the area specified by parameter pk_rsem.
Note For details about the semaphore state packet, refer to "12.5.2 Semaphore state packet".
Return value
Macro
Value
Description
E_OK
0
Normal completion.