ACE_Null_Semaphore Class Reference
Implement a do nothing ACE_Semaphore, i.e., all the methods are no ops.
More...
#include <Null_Semaphore.h>
List of all members.
Detailed Description
Implement a do nothing ACE_Semaphore, i.e., all the methods are no ops.
Although the methods are no-ops, the return values are different for the blocking as opposed to timed acquires. The blocking version of acquire() is often used to serialize access to a critical section, whereas the timed version is often used to wait for another thread to update some condition or change some shared state. When using an ACE_Null_Semaphore, however, there's no other thread involved to change a state or condition (otherwise, a null semaphore would be inappropriate). Returning an error value signifies that the state or condition has not been (and can't be) changed, which is consistent with the behavior of the threaded case where a timeout occurs before the state or condition is changed.
Definition at line 50 of file Null_Semaphore.h.
Constructor & Destructor Documentation
ACE_Null_Semaphore::ACE_Null_Semaphore |
( |
unsigned |
int = 1 , |
|
|
int |
= 0 , |
|
|
const ACE_TCHAR * |
= 0 , |
|
|
void * |
= 0 , |
|
|
int |
= 0x7fffffff | |
|
) |
| | [inline] |
ACE_Null_Semaphore::~ACE_Null_Semaphore |
( |
void |
|
) |
[inline] |
Member Function Documentation
Return -1 with errno
== ETIME
.
Definition at line 69 of file Null_Semaphore.h.
00069 {errno = ETIME; return -1;}
Return -1 with errno
== ETIME
.
Definition at line 66 of file Null_Semaphore.h.
00066 {errno = ETIME; return -1;}
int ACE_Null_Semaphore::acquire |
( |
void |
|
) |
[inline] |
int ACE_Null_Semaphore::acquire_read |
( |
void |
|
) |
[inline] |
int ACE_Null_Semaphore::acquire_write |
( |
void |
|
) |
[inline] |
void ACE_Null_Semaphore::dump |
( |
void |
|
) |
const [inline] |
int ACE_Null_Semaphore::release |
( |
size_t |
|
) |
[inline] |
int ACE_Null_Semaphore::release |
( |
void |
|
) |
[inline] |
int ACE_Null_Semaphore::remove |
( |
void |
|
) |
[inline] |
int ACE_Null_Semaphore::tryacquire |
( |
void |
|
) |
[inline] |
int ACE_Null_Semaphore::tryacquire_read |
( |
void |
|
) |
[inline] |
int ACE_Null_Semaphore::tryacquire_write |
( |
void |
|
) |
[inline] |
int ACE_Null_Semaphore::tryacquire_write_upgrade |
( |
void |
|
) |
[inline] |
The documentation for this class was generated from the following file:
Generated on Tue Feb 2 17:35:24 2010 for ACE by
1.4.7