This class implements a semaphore type, optimized for post, for thread synchronization.
Synopsis
Declared in <bslmt_fastpostsemaphoreimpl.h>
template<
class ATOMIC_OP,
class MUTEX,
class CONDITION,
class THREADUTIL>
class FastPostSemaphoreImpl;
Enums
Name |
Description |
Status codes returned by semaphore operations. |
Member Functions
Name |
Description |
|
Constructors |
Return the clock type used for timeouts. |
|
Disable waiting on this semaphore. |
|
Enable waiting on this semaphore. If the semaphore is initially enabled, this call has no effect. |
|
Return an odd value if this semaphore is wait disabled, and an even value otherwise. |
|
Return the current value ( |
|
Return the current value ( |
|
Return |
|
|
|
Atomically increase the count of this semaphore by the specified |
|
Reduce the count by up to |
|
If the count of this semaphore is positive, reduce the count to 0 and return the original value of the count. Otherwise, do nothing and return 0. |
|
Block until a resource is available or |
|
Attempt to acquire a resource without blocking. |
|
Block until a resource is available and acquire it. |
Static Data Members
Name |
Description |
Increment value for the available count in |
|
Mask for the available‐count field in |
|
Bit shift for the available‐count field in |
|
Increment value for the blocked‐thread count in |
|
Mask for the blocked‐thread count field in |
|
Increment value for the disabled‐generation count in |
|
Mask for the disabled‐generation field in |
|
Bit shift for the disabled‐generation field in |
Created with MrDocs