summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-10 00:03:18 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-10 00:03:18 +0000
commit21e4afa1a45503a62d293f18e2d6e4f5d0c6058f (patch)
tree824cc5490b1bc905232c65981b59773e3165bb37
parentd093fa0d364922288fc15e7783037262bd4658e8 (diff)
downloadATCD-21e4afa1a45503a62d293f18e2d6e4f5d0c6058f.tar.gz
ChangeLogTag:Fri Jul 09 18:48:03 1999 Irfan Pyarali <irfan@cs.wustl.edu>
-rw-r--r--ChangeLog-99b28
-rw-r--r--ace/Strategies_T.i4
-rw-r--r--ace/Svc_Handler.cpp7
-rw-r--r--tests/Conn_Test.cpp31
4 files changed, 51 insertions, 19 deletions
diff --git a/ChangeLog-99b b/ChangeLog-99b
index 2c6a88d5639..5f9b18eaed7 100644
--- a/ChangeLog-99b
+++ b/ChangeLog-99b
@@ -1,3 +1,21 @@
+Fri Jul 09 18:48:03 1999 Irfan Pyarali <irfan@cs.wustl.edu>
+
+ * ace/Strategies_T.i (ACE_Refcounted_Hash_Recyclable<T>::operator==):
+ The check should be for "and", not "or".
+
+ * tests/Conn_Test.cpp: Since timed accept is implemented using
+ select(), and we use timed accepts with threads, we need a real
+ lock even if the OS has thread-safe accept when using timed
+ accepts.
+
+ Also changed the default number of clients to 5. Hopefully,
+ this won't overrun the backlog on the listen socket.
+
+ * ace/Svc_Handler.cpp (shutdown): Remove self from Reactor only
+ when we have a valid handle. Otherwise, we lose our current
+ errno, since the failed remove_handler will set the errno to
+ EINVAL.
+
Fri Jul 9 14:02:52 1999 Steve Huston <shuston@riverace.com>
* ace/config-aix-4.x.h: Re-enabled ACE_LACKS_SETSCHED for AIX 4.3.
@@ -19,7 +37,7 @@ Fri Jul 9 14:27:10 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
messages. Only reenable them if the -d option is given. Thanks
to Jerry De Master <jdemaste@ipdinc.com> for reporting this.
- * ace/Based_Pointer_T: Factored out all but the operator-> into
+ * ace/Based_Pointer_T: Factored out all but the operator-> into
a new class called ACE_Based_Pointer_Basic so that we can use
this for "basic types" like char *. Thanks to Irfan for
pointing this out.
@@ -27,7 +45,7 @@ Fri Jul 9 14:27:10 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
* ace/Based_Pointer_Repository.cpp (unbind): Fixed a
bug in the unbind() loop. Thanks to David Levine and DEC UNIX
C++ for noticing this!
-
+
* ace/Reactor.i (schedule_wakeup): Fixed a misplaced assignment
of Event_Handler->reator (). Thanks to Carlos for reporting
this.
@@ -45,12 +63,12 @@ Fri Jul 09 13:11:33 1999 Nanbor Wang <nanbor@cs.wustl.edu>
Fri Jul 9 12:16:00 1999 Kirthika Parameswaran <kirthika@cs.wustl.edu>
- * ace/Caching_Utility_T.cpp (minimum):
+ * ace/Caching_Utility_T.cpp (minimum):
Modified minimum () of ACE_Recyclable_Handler_Utility class so
that the minimum value is also an entry which is purgable.
- * tests/Cache_Map_Manager_Test.cpp:
- SunC++4.0 compiler doesnt accept typedefs with templates and
+ * tests/Cache_Map_Manager_Test.cpp:
+ SunC++4.0 compiler doesnt accept typedefs with templates and
having ::, for example: HASH_MAP::iterator. One has to typedef
HASH_MAP::iterator and use it to typedef something else. Fixed
this problem in the above test.
diff --git a/ace/Strategies_T.i b/ace/Strategies_T.i
index 20b7103681c..dae0ed6bd10 100644
--- a/ace/Strategies_T.i
+++ b/ace/Strategies_T.i
@@ -363,7 +363,7 @@ ACE_Refcounted_Hash_Recyclable<T>::hash_i (void) const
template <class T> ASYS_INLINE int
ACE_Refcounted_Hash_Recyclable<T>::operator== (const ACE_Refcounted_Hash_Recyclable<T> &rhs) const
{
- if (this->state () != ACE_Recyclable::IDLE_AND_PURGABLE ||
+ if (this->state () != ACE_Recyclable::IDLE_AND_PURGABLE &&
this->state () != ACE_Recyclable::IDLE_BUT_NOT_PURGABLE)
return 0;
else
@@ -373,7 +373,7 @@ ACE_Refcounted_Hash_Recyclable<T>::operator== (const ACE_Refcounted_Hash_Recycla
template <class T> ASYS_INLINE int
ACE_Refcounted_Hash_Recyclable<T>::operator== (const T &rhs) const
{
- if (this->state () != ACE_Recyclable::IDLE_AND_PURGABLE ||
+ if (this->state () != ACE_Recyclable::IDLE_AND_PURGABLE &&
this->state () != ACE_Recyclable::IDLE_BUT_NOT_PURGABLE)
return 0;
else
diff --git a/ace/Svc_Handler.cpp b/ace/Svc_Handler.cpp
index effa6ab4608..83262666129 100644
--- a/ace/Svc_Handler.cpp
+++ b/ace/Svc_Handler.cpp
@@ -158,8 +158,11 @@ ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::shutdown (void)
// Make sure there are no timers.
this->reactor ()->cancel_timer (this);
- // Remove self from reactor.
- this->reactor ()->remove_handler (this, mask);
+ if (this->peer ().get_handle () != ACE_INVALID_HANDLE)
+ {
+ // Remove self from reactor.
+ this->reactor ()->remove_handler (this, mask);
+ }
}
// Remove self from the recycler.
diff --git a/tests/Conn_Test.cpp b/tests/Conn_Test.cpp
index 200d88d5772..d1bbccb97ee 100644
--- a/tests/Conn_Test.cpp
+++ b/tests/Conn_Test.cpp
@@ -46,11 +46,11 @@ USELIB("..\ace\aced.lib");
static int n_servers = 2;
static int n_clients = 4;
#else
-static int n_servers = 4;
-static int n_clients = 10;
+static int n_servers = 5;
+static int n_clients = 5;
#endif /* ACE_HAS_PHARLAP */
-static int n_client_iterations = 2;
+static int n_client_iterations = 3;
Svc_Handler::Svc_Handler (ACE_Thread_Manager *)
{
@@ -183,16 +183,27 @@ Svc_Handler::idle (u_long flags)
return ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>::idle (flags);
}
+//
// The following works around bugs with some operating systems, which
// don't allow multiple threads/process to call accept() on the same
-// listen-mode port/socket.
-#if defined (ACE_HAS_THREAD_SAFE_ACCEPT)
-typedef ACE_Null_Mutex ACCEPTOR_LOCKING;
-#elif defined (ACE_LACKS_FORK) && defined (ACE_HAS_THREADS)
-typedef ACE_Thread_Mutex ACCEPTOR_LOCKING;
+// listen-mode port/socket. Also, note that since timed accept is
+// implemented using select(), and we use timed accepts with threads,
+// we need a real lock even if the OS has thread-safe accept when
+// using timed accepts.
+//
+#if defined (ACE_LACKS_FORK)
+# if defined (ACE_HAS_THREADS)
+ typedef ACE_Thread_Mutex ACCEPTOR_LOCKING;
+# else
+ typedef ACE_Null_Mutex ACCEPTOR_LOCKING;
+# endif /* ACE_HAS_THREADS */
#else
-typedef ACE_Process_Mutex ACCEPTOR_LOCKING;
-#endif /* ACE_HAS_THREAD_SAFE_ACCEPT */
+# if defined (ACE_HAS_THREAD_SAFE_ACCEPT)
+ typedef ACE_Null_Mutex ACCEPTOR_LOCKING;
+# else
+ typedef ACE_Process_Mutex ACCEPTOR_LOCKING;
+# endif /* ACE_HAS_THREAD_SAFE_ACCEPT */
+#endif /* ACE_LACKS_FORK */
#if defined (ACE_HAS_TEMPLATE_TYPEDEFS)
#define LOCK_SOCK_ACCEPTOR ACE_LOCK_SOCK_Acceptor<ACCEPTOR_LOCKING>