|
The following functions are available to initialize and use a FastSemaphore.
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.
A thread uses the RtAcquireFastSemaphore function to place the current thread in a busy-wait state until the FastSemaphore is released.
A thread uses the RtGetCountFastSemaphore function to return the number of threads waiting on this FastSemaphore.
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.
A thread uses the RtReleaseFastSemaphore function to release the specified count of threads waiting on the FastSemaphore.