summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog-97b9
-rw-r--r--ace/Synch.h20
-rw-r--r--ace/Synch.i25
3 files changed, 53 insertions, 1 deletions
diff --git a/ChangeLog-97b b/ChangeLog-97b
index 8fd8f66ec76..9bbaf79dd61 100644
--- a/ChangeLog-97b
+++ b/ChangeLog-97b
@@ -1,3 +1,10 @@
+Mon Sep 29 21:28:02 1997 <irfan@TWOSTEP>
+
+ * ace/Synch (ACE_Recursive_Thread_Mutex): Methods were added to
+ ACE_Recursive_Thread_Mutex so that it has a consistent interface
+ with other locking mechanisms. Thanks to Phil Logan
+ <phill@in.ot.com.au> for submitting these changes.
+
Mon Sep 29 13:28:05 1997 David L. Levine <levine@cs.wustl.edu>
* ace/OS.i (thr_setconcurrency): added support on Irix 6.x, using
@@ -41,7 +48,7 @@ Sat Sep 27 17:04:48 1997 <irfan@TWOSTEP>
application. Also both the methods are virtual, and user can
subclass to change their behavior. The internal code of the
reactor also changed to now use these methods exclusively rather
- than the the raw data variables.
+ than the the raw data variables.
* ace/Acceptor.cpp (handle_input): When using the WFMO_Reactor, we
need to reset the event association for the newly created
diff --git a/ace/Synch.h b/ace/Synch.h
index b340c59db96..2b72c24c0d3 100644
--- a/ace/Synch.h
+++ b/ace/Synch.h
@@ -1016,6 +1016,26 @@ public:
int tryacquire (void);
// Conditionally acquire a recursive mutex (i.e., won't block).
+ int acquire_read (void);
+ // Acquire mutex ownership. This calls <acquire> and is only
+ // here to make the <ACE_Recusive_Thread_Mutex> interface consistent
+ // with the other synchronization APIs.
+
+ int acquire_write (void);
+ // Acquire mutex ownership. This calls <acquire> and is only
+ // here to make the <ACE_Recusive_Thread_Mutex> interface consistent
+ // with the other synchronization APIs.
+
+ int tryacquire_read (void);
+ // Conditionally acquire mutex (i.e., won't block). This calls
+ // <tryacquire> and is only here to make the <ACE_Recusive_Thread_Mutex>
+ // interface consistent with the other synchronization APIs.
+
+ int tryacquire_write (void);
+ // Conditionally acquire mutex (i.e., won't block). This calls
+ // <tryacquire> and is only here to make the <ACE_Recusive_Thread_Mutex>
+ // interface consistent with the other synchronization APIs.
+
int release (void);
// Releases a recursive mutex (will not release mutex until all the
// nesting level drops to 0, which means the mutex is no longer
diff --git a/ace/Synch.i b/ace/Synch.i
index 8ac46011715..d76ba3a6932 100644
--- a/ace/Synch.i
+++ b/ace/Synch.i
@@ -527,5 +527,30 @@ ACE_Recursive_Thread_Mutex::set_thread_id (ACE_thread_t t)
// ACE_TRACE ("ACE_Recursive_Thread_Mutex::set_thread_id");
this->owner_id_ = t;
}
+
+ACE_INLINE int
+ACE_Recursive_Thread_Mutex::acquire_read (void)
+{
+ return acquire ();
+}
+
+ACE_INLINE int
+ACE_Recursive_Thread_Mutex::acquire_write (void)
+{
+ return acquire ();
+}
+
+ACE_INLINE int
+ACE_Recursive_Thread_Mutex::tryacquire_read (void)
+{
+ return tryacquire ();
+}
+
+ACE_INLINE int
+ACE_Recursive_Thread_Mutex::tryacquire_write (void)
+{
+ return tryacquire ();
+}
+
#endif /* ACE_HAS_THREADS */