#include <Process_Semaphore.h>
Collaboration diagram for ACE_Process_Semaphore:

Public Member Functions | |
| ACE_Process_Semaphore (u_int count=1, const ACE_TCHAR *name=0, void *=0, int max=0x7FFFFFFF) | |
| int | remove (void) |
| int | acquire (void) |
| int | tryacquire (void) |
| int | release (void) |
| Increment the semaphore, potentially unblocking a waiting thread. | |
| int | acquire_read (void) |
| int | acquire_write (void) |
| int | tryacquire_read (void) |
| int | tryacquire_write (void) |
| int | tryacquire_write_upgrade (void) |
| const ACE_sema_t & | lock (void) const |
| Return the underlying lock. | |
| void | dump (void) const |
| Dump the state of an object. | |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks. | |
Protected Attributes | |
| ACE_Semaphore | lock_ |
|
||||||||||||||||||||
|
Initialize the semaphore, with an initial value of count and a maximum value of max. |
|
|
Block the thread until the semaphore count becomes greater than 0, then decrement it. |
|
|
Acquire semaphore ownership. This calls <acquire> and is only here to make the <ace_process_semaphore> interface consistent with the other synchronization APIs. |
|
|
Acquire semaphore ownership. This calls <acquire> and is only here to make the <ace_process_semaphore> interface consistent with the other synchronization APIs. |
|
|
Dump the state of an object.
|
|
|
Return the underlying lock.
|
|
|
Increment the semaphore, potentially unblocking a waiting thread.
|
|
|
Explicitly destroy the semaphore. Note that only one thread should call this method since it doesn't protect against race conditions. |
|
|
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, |
|
|
Conditionally acquire semaphore (i.e., won't block). This calls <tryacquire> and is only here to make the <ace_process_semaphore> interface consistent with the other synchronization APIs. Returns -1 on failure. If we "failed" because someone else already had the lock, <errno> is set to <ebusy>. |
|
|
Conditionally acquire semaphore (i.e., won't block). This calls <tryacquire> and is only here to make the ACE_Process_Semaphore interface consistent with the other synchronization APIs. Returns -1 on failure. If we "failed" because someone else already had the lock, <errno> is set to <ebusy>. |
|
|
This is only here to make the ACE_Process_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. |
|
|
Declare the dynamic allocation hooks.
|
|
|
|
1.3.9.1