#include <Null_Semaphore.h>
Public Member Functions | |
ACE_Null_Semaphore (unsigned int=1, int=0, const ACE_TCHAR *=0, void *=0, int=0x7fffffff) | |
~ACE_Null_Semaphore (void) | |
int | remove (void) |
Return 0. | |
int | acquire (void) |
Return 0. | |
int | acquire (ACE_Time_Value &) |
Return -1 with errno == ETIME . | |
int | acquire (ACE_Time_Value *) |
Return -1 with errno == ETIME . | |
int | tryacquire (void) |
Return 0. | |
int | release (void) |
Return 0. | |
int | release (size_t) |
Return 0. | |
int | acquire_write (void) |
Return 0. | |
int | tryacquire_write (void) |
Return 0. | |
int | tryacquire_write_upgrade (void) |
Return 0. | |
int | acquire_read (void) |
Return 0. | |
int | tryacquire_read (void) |
Return 0. | |
void | dump (void) const |
Dump the state of an object. |
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.
|
Definition at line 53 of file Null_Semaphore.h. References ACE_TCHAR.
00057 {} |
|
Definition at line 58 of file Null_Semaphore.h.
00058 {} |
|
Return -1 with
Definition at line 69 of file Null_Semaphore.h. References ETIME.
00069 {errno = ETIME; return -1;} |
|
Return -1 with
Definition at line 66 of file Null_Semaphore.h. References ETIME.
00066 {errno = ETIME; return -1;} |
|
Return 0.
Definition at line 63 of file Null_Semaphore.h.
00063 {return 0;}
|
|
Return 0.
Definition at line 90 of file Null_Semaphore.h.
00090 {return 0;}
|
|
Return 0.
Definition at line 81 of file Null_Semaphore.h.
00081 {return 0;}
|
|
Dump the state of an object.
Definition at line 96 of file Null_Semaphore.h.
00096 {} |
|
Return 0.
Definition at line 78 of file Null_Semaphore.h.
00078 {return 0;}
|
|
Return 0.
Definition at line 75 of file Null_Semaphore.h.
00075 {return 0;}
|
|
Return 0.
Definition at line 60 of file Null_Semaphore.h.
00060 {return 0;}
|
|
Return 0.
Definition at line 72 of file Null_Semaphore.h.
00072 {return 0;}
|
|
Return 0.
Definition at line 93 of file Null_Semaphore.h.
00093 {return 0;}
|
|
Return 0.
Definition at line 84 of file Null_Semaphore.h.
00084 {return 0;}
|
|
Return 0.
Definition at line 87 of file Null_Semaphore.h.
00087 {return 0;}
|