1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
|
.TH ACE_Null_Semaphore 3 "1 Dec 2001" "ACE" \" -*- nroff -*-
.ad l
.nh
.SH NAME
ACE_Null_Semaphore \- Implement a do nothing , i.e., all the methods are no ops.
.SH SYNOPSIS
.br
.PP
\fC#include <Synch.h>\fR
.PP
.SS Public Methods
.in +1c
.ti -1c
.RI "\fBACE_Null_Semaphore\fR (u_int count = 1, int type = USYNC_THREAD, const \fBACE_TCHAR\fR *name = 0, void * = 0, int max = 0x7fffffff)"
.br
.ti -1c
.RI "\fB~ACE_Null_Semaphore\fR (void)"
.br
.ti -1c
.RI "int \fBremove\fR (void)"
.br
.RI "\fIReturn 0.\fR"
.ti -1c
.RI "int \fBacquire\fR (void)"
.br
.RI "\fIReturn 0.\fR"
.ti -1c
.RI "int \fBacquire\fR (\fBACE_Time_Value\fR &)"
.br
.RI "\fIReturn -1 with <errno> == <ETIME>.\fR"
.ti -1c
.RI "int \fBacquire\fR (\fBACE_Time_Value\fR *)"
.br
.RI "\fIReturn -1 with <errno> == <ETIME>.\fR"
.ti -1c
.RI "int \fBtryacquire\fR (void)"
.br
.RI "\fIReturn 0.\fR"
.ti -1c
.RI "int \fBrelease\fR (void)"
.br
.RI "\fIReturn 0.\fR"
.ti -1c
.RI "int \fBrelease\fR (size_t)"
.br
.RI "\fIReturn 0.\fR"
.ti -1c
.RI "int \fBacquire_write\fR (void)"
.br
.RI "\fIReturn 0.\fR"
.ti -1c
.RI "int \fBtryacquire_write\fR (void)"
.br
.RI "\fIReturn 0.\fR"
.ti -1c
.RI "int \fBtryacquire_write_upgrade\fR (void)"
.br
.RI "\fIReturn 0.\fR"
.ti -1c
.RI "int \fBacquire_read\fR (void)"
.br
.RI "\fIReturn 0.\fR"
.ti -1c
.RI "int \fBtryacquire_read\fR (void)"
.br
.RI "\fIReturn 0.\fR"
.ti -1c
.RI "void \fBdump\fR (void) const"
.br
.RI "\fIDump the state of an object.\fR"
.in -1c
.SS Public Attributes
.in +1c
.ti -1c
.RI "\fBACE_ALLOC_HOOK_DECLARE\fR"
.br
.RI "\fIDeclare the dynamic allocation hooks.\fR"
.in -1c
.SH DETAILED DESCRIPTION
.PP
Implement a do nothing , i.e., all the methods are no ops.
.PP
.PP
Although the methods are no-ops, the return values are different for the blocking as opposed to timed acquires. The blocking version of \fBacquire\fR() 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.
.PP
.SH CONSTRUCTOR & DESTRUCTOR DOCUMENTATION
.PP
.SS ACE_Null_Semaphore::ACE_Null_Semaphore (u_int count = 1, int type = USYNC_THREAD, const \fBACE_TCHAR\fR * name = 0, void * = 0, int max = 0x7fffffff)
.PP
.SS ACE_Null_Semaphore::~ACE_Null_Semaphore (void)
.PP
.SH MEMBER FUNCTION DOCUMENTATION
.PP
.SS int ACE_Null_Semaphore::acquire (\fBACE_Time_Value\fR *)
.PP
Return -1 with <errno> == <ETIME>.
.PP
.SS int ACE_Null_Semaphore::acquire (\fBACE_Time_Value\fR &)
.PP
Return -1 with <errno> == <ETIME>.
.PP
.SS int ACE_Null_Semaphore::acquire (void)
.PP
Return 0.
.PP
.SS int ACE_Null_Semaphore::acquire_read (void)
.PP
Return 0.
.PP
.SS int ACE_Null_Semaphore::acquire_write (void)
.PP
Return 0.
.PP
.SS void ACE_Null_Semaphore::dump (void) const
.PP
Dump the state of an object.
.PP
.SS int ACE_Null_Semaphore::release (size_t)
.PP
Return 0.
.PP
.SS int ACE_Null_Semaphore::release (void)
.PP
Return 0.
.PP
.SS int ACE_Null_Semaphore::remove (void)
.PP
Return 0.
.PP
.SS int ACE_Null_Semaphore::tryacquire (void)
.PP
Return 0.
.PP
.SS int ACE_Null_Semaphore::tryacquire_read (void)
.PP
Return 0.
.PP
.SS int ACE_Null_Semaphore::tryacquire_write (void)
.PP
Return 0.
.PP
.SS int ACE_Null_Semaphore::tryacquire_write_upgrade (void)
.PP
Return 0.
.PP
.SH MEMBER DATA DOCUMENTATION
.PP
.SS ACE_Null_Semaphore::ACE_ALLOC_HOOK_DECLARE
.PP
Declare the dynamic allocation hooks.
.PP
.SH AUTHOR
.PP
Generated automatically by Doxygen for ACE from the source code.
|