summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2001-03-05 21:14:01 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2001-03-05 21:14:01 +0000
commit21a7ef5288aa3e3c66ae15bb2925ed459848e3dc (patch)
treee9aac744f72780ad6c258bb46a6791a1a950313f
parent532c0763f023c29aa84803bbf7c56a4c99666a01 (diff)
downloadATCD-21a7ef5288aa3e3c66ae15bb2925ed459848e3dc.tar.gz
ChangeLogTag:Mon Mar 5 13:56:33 2001 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
-rw-r--r--ChangeLog32
-rw-r--r--ChangeLogs/ChangeLog-02a32
-rw-r--r--ChangeLogs/ChangeLog-03a32
-rw-r--r--THANKS3
-rw-r--r--ace/Event_Handler.h5
-rw-r--r--ace/Log_Record.cpp7
-rw-r--r--ace/Synch_T.h16
-rw-r--r--ace/Synch_T.i20
-rw-r--r--apps/Gateway/Gateway/Concrete_Connection_Handlers.cpp12
-rw-r--r--apps/Gateway/Gateway/Concrete_Connection_Handlers.h6
10 files changed, 143 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index f94010c6b8e..bb7fbca3a9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+Mon Mar 5 13:56:33 2001 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+
+ * ace/Synch_T.{h,i}: Added a disown() method that relinquishes
+ ownership of the lock so that it is not released implicitly in
+ the destructor. Thanks to Chris Kohlhoff <chris@kohlhoff.com>
+ for contributing this.
+
+ * ace/Event_Handler.h: Updated the comment on handle_close() so that
+ it more accurately reflects what is going on. Thanks to Defang
+ Zhou <dzhou@inktomi.com> for suggesting this.
+
+ * apps/Gateway/Gateway/Concrete_Connection_Handlers.{h,cpp}: Added
+ handle_close() operations to solve problems with certain
+ concurrency models. Thanks to Defang Zhou <dzhou@inktomi.com>
+ for reporting this.
+
Mon Mar 5 11:29:36 2001 Carlos O'Ryan <coryan@uci.edu>
* docs/ACE-categories.html:
@@ -15,12 +31,16 @@ Mon Mar 5 08:20:21 2001 Carlos O'Ryan <coryan@uci.edu>
Mon Mar 5 07:52:52 2001 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
- * tests/RMCast/RMCast_Fragment_Test.cpp,
- * tests/RMCast/RMCast_Reassembly_Test.cpp,
- * tests/Dynamic_Priority_Test.cpp,
- * tests/Thread_Pool_Test.cpp: Make sure to write into the
- wr_ptr() rather than the rd_ptr(). Thanks to Gonzalo Diethelm
- <Gonzalo.Diethelm@sonda.com> for reporting this.
+ * ace/Log_Record.cpp (priority): Clarified the behavior of the
+ priority() set/get methods. Thanks to Christian Schuhegger
+ <Christian.Schuhegger@cern.ch> for reporting this.
+
+ * tests/RMCast/RMCast_Fragment_Test.cpp,
+ * tests/RMCast/RMCast_Reassembly_Test.cpp,
+ * tests/Dynamic_Priority_Test.cpp,
+ * tests/Thread_Pool_Test.cpp: Make sure to write into the
+ wr_ptr() rather than the rd_ptr(). Thanks to Gonzalo Diethelm
+ <Gonzalo.Diethelm@sonda.com> for reporting this.
Mon Mar 5 08:00:23 2001 Chad Elliott <elliott_c@ociweb.com>
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index f94010c6b8e..bb7fbca3a9a 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,19 @@
+Mon Mar 5 13:56:33 2001 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+
+ * ace/Synch_T.{h,i}: Added a disown() method that relinquishes
+ ownership of the lock so that it is not released implicitly in
+ the destructor. Thanks to Chris Kohlhoff <chris@kohlhoff.com>
+ for contributing this.
+
+ * ace/Event_Handler.h: Updated the comment on handle_close() so that
+ it more accurately reflects what is going on. Thanks to Defang
+ Zhou <dzhou@inktomi.com> for suggesting this.
+
+ * apps/Gateway/Gateway/Concrete_Connection_Handlers.{h,cpp}: Added
+ handle_close() operations to solve problems with certain
+ concurrency models. Thanks to Defang Zhou <dzhou@inktomi.com>
+ for reporting this.
+
Mon Mar 5 11:29:36 2001 Carlos O'Ryan <coryan@uci.edu>
* docs/ACE-categories.html:
@@ -15,12 +31,16 @@ Mon Mar 5 08:20:21 2001 Carlos O'Ryan <coryan@uci.edu>
Mon Mar 5 07:52:52 2001 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
- * tests/RMCast/RMCast_Fragment_Test.cpp,
- * tests/RMCast/RMCast_Reassembly_Test.cpp,
- * tests/Dynamic_Priority_Test.cpp,
- * tests/Thread_Pool_Test.cpp: Make sure to write into the
- wr_ptr() rather than the rd_ptr(). Thanks to Gonzalo Diethelm
- <Gonzalo.Diethelm@sonda.com> for reporting this.
+ * ace/Log_Record.cpp (priority): Clarified the behavior of the
+ priority() set/get methods. Thanks to Christian Schuhegger
+ <Christian.Schuhegger@cern.ch> for reporting this.
+
+ * tests/RMCast/RMCast_Fragment_Test.cpp,
+ * tests/RMCast/RMCast_Reassembly_Test.cpp,
+ * tests/Dynamic_Priority_Test.cpp,
+ * tests/Thread_Pool_Test.cpp: Make sure to write into the
+ wr_ptr() rather than the rd_ptr(). Thanks to Gonzalo Diethelm
+ <Gonzalo.Diethelm@sonda.com> for reporting this.
Mon Mar 5 08:00:23 2001 Chad Elliott <elliott_c@ociweb.com>
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index f94010c6b8e..bb7fbca3a9a 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,19 @@
+Mon Mar 5 13:56:33 2001 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+
+ * ace/Synch_T.{h,i}: Added a disown() method that relinquishes
+ ownership of the lock so that it is not released implicitly in
+ the destructor. Thanks to Chris Kohlhoff <chris@kohlhoff.com>
+ for contributing this.
+
+ * ace/Event_Handler.h: Updated the comment on handle_close() so that
+ it more accurately reflects what is going on. Thanks to Defang
+ Zhou <dzhou@inktomi.com> for suggesting this.
+
+ * apps/Gateway/Gateway/Concrete_Connection_Handlers.{h,cpp}: Added
+ handle_close() operations to solve problems with certain
+ concurrency models. Thanks to Defang Zhou <dzhou@inktomi.com>
+ for reporting this.
+
Mon Mar 5 11:29:36 2001 Carlos O'Ryan <coryan@uci.edu>
* docs/ACE-categories.html:
@@ -15,12 +31,16 @@ Mon Mar 5 08:20:21 2001 Carlos O'Ryan <coryan@uci.edu>
Mon Mar 5 07:52:52 2001 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
- * tests/RMCast/RMCast_Fragment_Test.cpp,
- * tests/RMCast/RMCast_Reassembly_Test.cpp,
- * tests/Dynamic_Priority_Test.cpp,
- * tests/Thread_Pool_Test.cpp: Make sure to write into the
- wr_ptr() rather than the rd_ptr(). Thanks to Gonzalo Diethelm
- <Gonzalo.Diethelm@sonda.com> for reporting this.
+ * ace/Log_Record.cpp (priority): Clarified the behavior of the
+ priority() set/get methods. Thanks to Christian Schuhegger
+ <Christian.Schuhegger@cern.ch> for reporting this.
+
+ * tests/RMCast/RMCast_Fragment_Test.cpp,
+ * tests/RMCast/RMCast_Reassembly_Test.cpp,
+ * tests/Dynamic_Priority_Test.cpp,
+ * tests/Thread_Pool_Test.cpp: Make sure to write into the
+ wr_ptr() rather than the rd_ptr(). Thanks to Gonzalo Diethelm
+ <Gonzalo.Diethelm@sonda.com> for reporting this.
Mon Mar 5 08:00:23 2001 Chad Elliott <elliott_c@ociweb.com>
diff --git a/THANKS b/THANKS
index ebf177c3150..9cfccda5b80 100644
--- a/THANKS
+++ b/THANKS
@@ -882,7 +882,7 @@ Chris Leishman <chris_leishman@freeonline.com.au>
Klemen Zagar <klemen.zagar@irj.si>
Rick Ohnemus <rjohnemus@systemware-inc.com>
Adamo, Vince <adamo@vignette.com>
-Defang Zhou <dzhou@zoo.uvm.edu>
+Defang Zhou <dzhou@inktomi.com>
Dave Zumbro <zumbro_d@ociweb.com>
Ted Nolan <ted@ags.ga.erg.sri.com>
Jianfei Xu <jxu@yahoo.com>
@@ -1165,6 +1165,7 @@ Mike Snowy <snowymike@aol.com>
John Mackenzie <John.Mackenzie.extern@icn.siemens.de>
Ricky Marek <ricky@waveip.com>
Patrick Maassen <patrick.maassen@meco.nl>
+Christian Schuhegger <Christian.Schuhegger@cern.ch>
I would particularly like to thank Paul Stephenson, who worked with me
at Ericsson in the early 1990's. Paul devised the recursive Makefile
diff --git a/ace/Event_Handler.h b/ace/Event_Handler.h
index 3d62528e38f..9d06e4a6dbb 100644
--- a/ace/Event_Handler.h
+++ b/ace/Event_Handler.h
@@ -116,7 +116,10 @@ public:
/// Called when a process exits.
virtual int handle_exit (ACE_Process *);
- /// Called when object is removed from the <ACE_Reactor>.
+ /// Called when a <handle_*()> method returns -1 or when the
+ /// <remove_handler> method is called on an <ACE_Reactor>. The
+ /// <close_mask> indicates which event has triggered the
+ /// <handle_close> method callback on a particular <handle>.
virtual int handle_close (ACE_HANDLE handle,
ACE_Reactor_Mask close_mask);
diff --git a/ace/Log_Record.cpp b/ace/Log_Record.cpp
index e81223a48c0..5e34592fd47 100644
--- a/ace/Log_Record.cpp
+++ b/ace/Log_Record.cpp
@@ -41,6 +41,10 @@ u_long
ACE_Log_Record::priority (void) const
{
ACE_TRACE ("ACE_Log_Record::priority");
+
+ // Get the priority of the <Log_Record> <type_>. This is computed
+ // as the base 2 logarithm of <type_> (which must be a power of 2,
+ // as defined by the enums in <ACE_Log_Priority>).
return ACE::log2 (this->type_);
}
@@ -48,6 +52,9 @@ void
ACE_Log_Record::priority (u_long p)
{
ACE_TRACE ("ACE_Log_Record::priority");
+
+ // Set the priority of the <Log_Record> <type_> (which must be a
+ // power of 2, as defined by the enums in <ACE_Log_Priority>).
this->type_ = p;
}
diff --git a/ace/Synch_T.h b/ace/Synch_T.h
index 81980b6cb40..71279c6fbed 100644
--- a/ace/Synch_T.h
+++ b/ace/Synch_T.h
@@ -10,7 +10,6 @@
*/
//=============================================================================
-
#ifndef ACE_SYNCH_T_H
#define ACE_SYNCH_T_H
#include "ace/pre.h"
@@ -427,9 +426,18 @@ public:
ACE_Guard (ACE_LOCK &l);
/// Implicitly and automatically acquire (or try to acquire) the
- /// lock.
+ /// lock. If <block> is non-0 then <acquire> the <ACE_LOCK>, else
+ /// <tryacquire> it.
ACE_Guard (ACE_LOCK &l, int block);
+ /// Implicitly and automatically acquire (or try to acquire) the
+ /// lock. If <become_owner> is 0 then initialize the guard without
+ /// automatically acquiring the lock; this parameter simply indicates
+ /// whether the guard should release the lock implicitly on destruction.
+ /// If <block> is non-0 then <acquire> the <ACE_LOCK>, else
+ /// <tryacquire> it.
+ ACE_Guard (ACE_LOCK &l, int block, int become_owner);
+
/// Implicitly release the lock.
~ACE_Guard (void);
@@ -444,6 +452,10 @@ public:
/// Explicitly release the lock, but only if it is held!
int release (void);
+ /// Relinquish ownership of the lock so that it is not released
+ /// implicitly in the destructor.
+ void disown (void);
+
// = Utility methods.
/// 1 if locked, 0 if couldn't acquire the lock
/// (errno will contain the reason for this).
diff --git a/ace/Synch_T.i b/ace/Synch_T.i
index aa58320773f..2bce599f097 100644
--- a/ace/Synch_T.i
+++ b/ace/Synch_T.i
@@ -46,6 +46,20 @@ ACE_Guard<ACE_LOCK>::ACE_Guard (ACE_LOCK &l, int block)
this->tryacquire ();
}
+template <class ACE_LOCK> ACE_INLINE
+ACE_Guard<ACE_LOCK>::ACE_Guard (ACE_LOCK &l, int block, int become_owner)
+ : lock_ (&l),
+ owner_ (0)
+{
+ if (become_owner)
+ {
+ if (block)
+ this->acquire ();
+ else
+ this->tryacquire ();
+ }
+}
+
// Implicitly and automatically acquire (or try to acquire) the
// lock.
@@ -67,6 +81,12 @@ ACE_Guard<ACE_LOCK>::remove (void)
return this->lock_->remove ();
}
+template <class ACE_LOCK> ACE_INLINE void
+ACE_Guard<ACE_LOCK>::disown (void)
+{
+ this->owner_ = -1;
+}
+
template <class ACE_LOCK> ACE_INLINE
ACE_Write_Guard<ACE_LOCK>::ACE_Write_Guard (ACE_LOCK &m)
: ACE_Guard<ACE_LOCK> (&m)
diff --git a/apps/Gateway/Gateway/Concrete_Connection_Handlers.cpp b/apps/Gateway/Gateway/Concrete_Connection_Handlers.cpp
index 008b9fce7c7..b1acae66bde 100644
--- a/apps/Gateway/Gateway/Concrete_Connection_Handlers.cpp
+++ b/apps/Gateway/Gateway/Concrete_Connection_Handlers.cpp
@@ -719,3 +719,15 @@ Thr_Supplier_Handler::svc (void)
}
ACE_NOTREACHED(return 0);
}
+
+int
+Thr_Consumer_Handler::handle_close (ACE_HANDLE, ACE_Reactor_Mask)
+{
+ return 0;
+}
+
+int
+Thr_Supplier_Handler::handle_close (ACE_HANDLE, ACE_Reactor_Mask)
+{
+ return 0;
+}
diff --git a/apps/Gateway/Gateway/Concrete_Connection_Handlers.h b/apps/Gateway/Gateway/Concrete_Connection_Handlers.h
index b149856de05..3f9203d037b 100644
--- a/apps/Gateway/Gateway/Concrete_Connection_Handlers.h
+++ b/apps/Gateway/Gateway/Concrete_Connection_Handlers.h
@@ -107,6 +107,9 @@ protected:
virtual int svc (void);
// Transmit peer messages.
+
+ virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask);
+ // Called when peers shutdown.
};
class Thr_Supplier_Handler : public Supplier_Handler
@@ -122,6 +125,9 @@ public:
protected:
virtual int svc (void);
// Transmit peer messages.
+
+ virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask);
+ // Called when peers shutdown.
};
#endif /* CONCRETE_CONNECTION_HANDLER */