-
sig_sem
isig_sem
-
Release semaphore resource.
ER sig_sem ( ID semid );
ER isig_sem ( ID semid );
|
MOV A, #semid
CALL !!_sig_sem
MOV A, #semid
CALL !!_isig_sem
|
|
|
|
|
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 1 If the first task linked in the wait queue is moved to the READY state after this service call is issued, this service call also re-queues the task at the end of the ready queue corresponding to the priority of the task.
Note 2 The semaphore counter managed by the RI78V4 is configured in 7-bit widths. If the number of resources exceeds the maximum count value 127 as a result of issuing this service call, the counter manipulation processing is therefore not performed but "E_QOVR" is returned.
|
|
|
|
|
|
|
|
Queue overflow (release will exceed maximum resource count "127").
|