ACE_Semaphore Class ReferenceWrapper for Dijkstra style general semaphores. More...
Detailed DescriptionWrapper for Dijkstra style general semaphores.Constructor & Destructor Documentation
Initialize the semaphore, with initial value of "count".
Implicitly destroy the semaphore.
Member Function Documentation
Explicitly destroy the semaphore. Note that only one thread should call this method since it doesn't protect against race conditions.
Block the thread until the semaphore count becomes greater than 0, then decrement it.
Block the thread until the semaphore count becomes greater than 0 (at which point it is decremented) or until tv times out (in which case -1 is returned and
If tv == 0 then call <acquire()> directly. Otherwise, Block the thread until the semaphore count becomes greater than 0 (at which point it is decremented) or until tv times out (in which case -1 is returned and
Conditionally decrement the semaphore if count is greater than 0 (i.e., won't block). Returns -1 on failure. If we "failed" because someone else already had the lock,
Increment the semaphore by 1, potentially unblocking a waiting thread.
Increment the semaphore by release_count, potentially unblocking waiting threads.
Acquire semaphore ownership. This calls <acquire> and is only here to make the ACE_Semaphore interface consistent with the other synchronization APIs.
Acquire semaphore ownership. This calls <acquire> and is only here to make the ACE_Semaphore interface consistent with the other synchronization APIs.
Conditionally acquire semaphore (i.e., won't block). This calls <tryacquire> and is only here to make the ACE_Semaphore interface consistent with the other synchronization APIs. Returns -1 on failure. If we "failed" because someone else already had the lock,
Conditionally acquire semaphore (i.e., won't block). This calls <tryacquire> and is only here to make the ACE_Semaphore interface consistent with the other synchronization APIs. Returns -1 on failure. If we "failed" because someone else already had the lock,
This is only here to make the ACE_Semaphore interface consistent with the other synchronization APIs. Assumes the caller has already acquired the semaphore using one of the above calls, and returns 0 (success) always.
Dump the state of an object.
Return the underlying lock.
Member Data DocumentationDeclare the dynamic allocation hooks.
Keeps track of whether remove() has been called yet to avoid multiple remove() calls, e.g., explicitly and implicitly in the destructor. This flag isn't protected by a lock, so make sure that you don't have multiple threads simultaneously calling remove () on the same object, which is a bad idea anyway...
The documentation for this class was generated from the following files: Generated on Mon Sep 15 07:16:46 2008 for ACE by ![]() |