RtReleaseFastSemaphore

RtReleaseFastSemaphore releases the specified count of threads waiting on the fast semaphore. If the number of waiting threads is less than the specified count, RtReleaseFastSemaphore will store the remaining count value and continue to release new threads that call RtAcquireFastSemaphore on this fast semaphore.

Declaration

Copy
BOOL RtReleaseFastSemaphore(
    [in]    PRTFAST_SEMPHORE pSemaphore, 
    [in]    LONG count
)

Parameters

[in] pSemaphore

A pointer to a user allocated RTFAST_SEMAPHORE structure.

[in] count

A count of threads that should be released from the busy wait state.

Return Value

If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code.

Remarks

A fast semaphore provides signaling functionality without relying on the RTSS thread library. The result is shorter latency as use of this fast semaphore does not require the waking up of threads.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

RtssApi.h

Startup.lib

See Also: