FastSemaphore Functions

The following functions are available to initialize and use a FastSemaphore.

Using RtInitializeFastSemaphore

A thread uses the RtInitializeFastSemaphore function to initialize the RTFAST_SEMAPHORE structure variable. The RTFAST_SEMAPHORE structure must have been created before being passed into the RtInitializeFastSemaphore function.

Using RtAcquireFastSemaphore

A thread uses the RtAcquireFastSemaphore function to place the current thread in a busy-wait state until the FastSemaphore is released.

Using RtGetCountFastSemaphore

A thread uses the RtGetCountFastSemaphore function to return the number of threads waiting on this FastSemaphore.

Using RtReleaseAllFastSemaphore

A thread uses the RtReleaseAllFastSemaphore function to release all threads waiting on the FastSemaphore. The RtReleaseAllFastSemaphore function ensures that all waiting threads enter the ready-to-run state.

Using RtReleaseFastSemaphore

A thread uses the RtReleaseFastSemaphore function to release the specified count of threads waiting on the FastSemaphore.