-
ref_sem
iref_sem
-
Reference semaphore state.
ER ref_sem (ID semid, T_RSEM *pk_rsem);
ER iref_sem (ID semid, T_RSEM *pk_rsem);
|
|
|
|
ID semid;
|
ID number of the semaphore to be referenced.
|
|
T_RSEM *pk_rsem;
|
Pointer to the packet returning the semaphore state.
|
[Semaphore state packet: T_RSEM]
typedef struct t_rsem {
ID wtskid; /*Existence of waiting task*/
UINT semcnt; /*Current resource count*/
ATR sematr; /*Attribute*/
UINT maxsem; /*Maximum resource count*/
} T_RSEM;
|
Stores semaphore state packet (ID number of the task at the head of the wait queue, current resource count, etc.) of the semaphore specified by parameter
semid in the area specified by parameter
pk_rsem.
|
|
|
|
|
|
|
|
- semid > Maximum ID number
|
|
|
- This service call was issued in the CPU locked state.
|
|
|
- Specified semaphore is not registered.
|