-
sig_sem
isig_sem
-
Release semaphore resource.
ER sig_sem (ID semid);
ER isig_sem (ID semid);
|
|
|
|
ID semid;
|
ID number of the semaphore to which resource is released.
|
These service calls return the resource to the semaphore specified by parameter
semid (adds 0x1 to the semaphore counter).
If a task is queued in the wait queue of the target semaphore when this service call is issued, the counter manipulation processing is not performed but the resource is passed to the relevant task (first task of wait queue).
As a result, the relevant task is unlinked from the wait queue and is moved from the WAITING state (WAITING state for a semaphore resource) to the READY state, or from the WAITING-SUSPENDED state to the SUSPENDED state.
Note With the RI850V4, the maximum possible number of semaphore resources (maximum resource count) is defined during configuration. If the number of resources exceeds the specified maximum resource count, this service call therefore does not return the acquired resources (addition to the semaphore counter value) but returns E_QOVR.
|
|
|
|
|
|
|
|
- semid > Maximum ID number
|
|
|
- This service call was issued in the CPU locked state.
|
|
|
- Specified semaphore is not registered.
|
|
|
- Resource count exceeded maximum resource count.
|