summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog-97b6
-rw-r--r--ace/Atomic_Op.i7
-rw-r--r--ace/Synch_T.h6
3 files changed, 19 insertions, 0 deletions
diff --git a/ChangeLog-97b b/ChangeLog-97b
index 733b52fc5db..6fa26733452 100644
--- a/ChangeLog-97b
+++ b/ChangeLog-97b
@@ -1,3 +1,9 @@
+Fri Oct 17 18:34:00 1997 Douglas C. Schmidt <schmidt@flamenco.cs.wustl.edu>
+
+ * ace/Atomic_Op.i (lock): Added an accessor to ACE_Atomic_Op to
+ return a reference to the underlying lock. Thanks to Janusz
+ Stopa <jstopa@Bear.COM> for suggesting this.
+
Fri Oct 17 15:36:26 1997 <nw1@CHA-CHA>
* ACE/config-win32-common.h: Added a directive to disable warning
diff --git a/ace/Atomic_Op.i b/ace/Atomic_Op.i
index c79047a48b4..7edfc80c881 100644
--- a/ace/Atomic_Op.i
+++ b/ace/Atomic_Op.i
@@ -8,6 +8,13 @@ ACE_Atomic_Op<ACE_LOCK, TYPE>::operator++ (void)
return ++this->value_;
}
+template <class ACE_LOCK, class TYPE> ACE_INLINE ACE_LOCK &
+ACE_Atomic_Op<ACE_LOCK, TYPE>::lock (void)
+{
+// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::lock");
+ return this->lock_;
+}
+
template <class ACE_LOCK, class TYPE> ACE_INLINE TYPE
ACE_Atomic_Op<ACE_LOCK, TYPE>::operator+= (const TYPE &i)
{
diff --git a/ace/Synch_T.h b/ace/Synch_T.h
index d9d749e900b..6aaf0e71478 100644
--- a/ace/Synch_T.h
+++ b/ace/Synch_T.h
@@ -205,6 +205,12 @@ public:
ACE_Atomic_Op (const ACE_Atomic_Op<ACE_LOCK, TYPE> &);
// Manage copying...
+ ACE_LOCK &lock (void);
+ // Returns a reference to the underlying <ACE_LOCK>. This makes it
+ // possible to acquire the lock explicitly, which can be useful in
+ // some cases *if* you instantiate the <ACE_Atomic_Op> with an
+ // <ACE_Recursive_Mutex>.
+
private:
ACE_LOCK lock_;
// Type of synchronization mechanism.