Releases a given number of units to a semaphore.
A thread does not have to wait for a unit from a semaphore to release a unit to it.
When a thread releases units to a semaphore, and no thread of equal or higher priority waits, the thread remains running. If a higher priority thread is waiting for the unit, it preempts the lower priority thread.
The semaphore returns an E_LIMIT condition code when:
BOOLEAN ReleaseRtSemaphore(
    RTHANDLE hSemaphore,    // handle for RT semaphore
    WORD wReleaseCount      // number of units to release to semaphore
);
hSemaphore 
wReleaseCount 
If the transmission would cause the semaphore to exceed its maximum allowable supply, an E_LIMIT status code occurs. Otherwise, the transmission is successful and the system tries to satisfy the requests of the threads in the semaphore's thread queue, beginning at the head of the queue.
TRUE 
FALSE 
E_OK 0x0000 
E_LIMIT 0x0004 
E_EXIST 0x0006 
hSemaphore. 
E_TYPE 0x8002 
hSemaphore is not a handle for a semaphore. 
E_INVALID_ADDRESS 0x00E2 
| Versions | Defined in | Include | Link to | 
|---|---|---|---|
| INtime 3.0 | intime/rt/include/rtbase.h | rt.h | rt.lib |