summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog-98b6
-rw-r--r--ace/Synch.h66
2 files changed, 72 insertions, 0 deletions
diff --git a/ChangeLog-98b b/ChangeLog-98b
index 6bb737f86b0..440d12582fc 100644
--- a/ChangeLog-98b
+++ b/ChangeLog-98b
@@ -1,3 +1,9 @@
+Thu Aug 06 14:59:22 1998 Irfan Pyarali <irfan@cs.wustl.edu>
+
+ * ace/Synch: Added template specializations for
+ ACE_Guard<ACE_Null_Mutex>, ACE_Write_Guard<ACE_Null_Mutex>, and
+ ACE_Read_Guard<ACE_Null_Mutex>.
+
Thu Aug 6 14:30:11 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
* ace/config-irix6.x-sgic++-nothreads.h:
diff --git a/ace/Synch.h b/ace/Synch.h
index c47f5d9c7df..59e395a9aa5 100644
--- a/ace/Synch.h
+++ b/ace/Synch.h
@@ -1442,4 +1442,70 @@ public:
// Include the templates here.
#include "ace/Synch_T.h"
+template <class ACE_LOCK>
+class ACE_Guard;
+
+class ACE_Export ACE_Guard<ACE_Null_Mutex>
+{
+ // = TITLE
+ //
+ // = DESCRIPTION
+ //
+public:
+ // = Initialization and termination methods.
+ ACE_Guard (ACE_Null_Mutex &) {}
+ ACE_Guard (ACE_Null_Mutex &, 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_Null_Mutex> &))
+ ACE_UNIMPLEMENTED_FUNC (ACE_Guard (const ACE_Guard<ACE_Null_Mutex> &))
+};
+
+template <class ACE_LOCK>
+class ACE_Write_Guard;
+
+class ACE_Export ACE_Write_Guard<ACE_Null_Mutex> : public ACE_Guard<ACE_Null_Mutex>
+{
+ // = TITLE
+public:
+ ACE_Write_Guard (ACE_Null_Mutex &m)
+ : ACE_Guard<ACE_Null_Mutex> (m) {}
+ ACE_Write_Guard (ACE_Null_Mutex &m, int blocked)
+ : ACE_Guard<ACE_Null_Mutex> (m, blocked) {}
+
+ int acquire_write (void) { return 0; }
+ int acquire (void) { return 0; }
+ int tryacquire_write (void) { return 0; }
+ int tryacquire (void) { return 0; }
+ void dump (void) const {}
+};
+
+template <class ACE_LOCK>
+class ACE_Read_Guard;
+
+class ACE_Export ACE_Read_Guard<ACE_Null_Mutex> : public ACE_Guard<ACE_Null_Mutex>
+{
+ // = TITLE
+public:
+ ACE_Read_Guard (ACE_Null_Mutex &m)
+ : ACE_Guard<ACE_Null_Mutex> (m) {}
+ ACE_Read_Guard (ACE_Null_Mutex &m, int blocked)
+ : ACE_Guard<ACE_Null_Mutex> (m, blocked) {}
+
+ int acquire_write (void) { return 0; }
+ int acquire (void) { return 0; }
+ int tryacquire_write (void) { return 0; }
+ int tryacquire (void) { return 0; }
+ void dump (void) const {}
+};
+
#endif /* ACE_SYNCH_H */