summaryrefslogtreecommitdiff
path: root/ace/Select_Reactor.h
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-08-26 16:26:56 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-08-26 16:26:56 +0000
commit03f96a666acb5555faaff4ea877e1b0fbff95940 (patch)
tree4c2601d2005ff2602ac438e1308fdc7e3dbf33c1 /ace/Select_Reactor.h
parent913934f9fe98c0f1e9d52c20b8257ceb871b01e2 (diff)
downloadATCD-03f96a666acb5555faaff4ea877e1b0fbff95940.tar.gz
Reduced code in template class. Specialized ACE_Guard using lock-freed select_reactor_token
Diffstat (limited to 'ace/Select_Reactor.h')
-rw-r--r--ace/Select_Reactor.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/ace/Select_Reactor.h b/ace/Select_Reactor.h
index bc78ad28b15..319de07242f 100644
--- a/ace/Select_Reactor.h
+++ b/ace/Select_Reactor.h
@@ -32,6 +32,34 @@ typedef ACE_Select_Reactor_Token_T<ACE_Noop_Token> ACE_Select_Reactor_Token;
typedef ACE_Select_Reactor_T<ACE_Select_Reactor_Token> ACE_Select_Reactor;
+class ACE_Export ACE_Guard< ACE_Select_Reactor_Token_T<ACE_Noop_Token> >
+{
+ // = TITLE
+ // Template specialization of <ACE_Guard> for the
+ // <ACE_Null_Mutex>.
+ //
+ // = DESCRIPTION
+ // This specialization is useful since it helps to speedup
+ // performance of the "Null_Mutex" considerably.
+public:
+ // = Initialization and termination methods.
+ ACE_Guard (ACE_Select_Reactor_Token_T<ACE_Noop_Token> &) {}
+ ACE_Guard (ACE_Select_Reactor_Token_T<ACE_Noop_Token> &, int) {}
+ ~ACE_Guard (void) {}
+
+ int acquire (void) { return 0; }
+ int tryacquire (void) { return 0; }
+ int release (void) { return 0; }
+ int locked (void) { return 1; }
+ int remove (void) { return 0; }
+ void dump (void) const {}
+
+private:
+ // = Prevent assignment and initialization.
+ ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Guard< ACE_Select_Reactor_Token_T<ACE_Noop_Token> > &))
+ ACE_UNIMPLEMENTED_FUNC (ACE_Guard (const ACE_Guard< ACE_Select_Reactor_Token_T<ACE_Noop_Token> > &))
+};
+
#if defined (__ACE_INLINE__)
#include "ace/Select_Reactor.i"
#endif /* __ACE_INLINE__ */