summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2001-03-02 17:31:49 +0000
committerSteve Huston <shuston@riverace.com>2001-03-02 17:31:49 +0000
commit3f0c61d44a45bcdc7826a6b2504131008639a62f (patch)
tree7dd25e6a9765693a8b74306fb59d6a22a2eebd1a
parent33384a4e17c5e2b3e1eb04be737b353e74c0eef0 (diff)
downloadATCD-3f0c61d44a45bcdc7826a6b2504131008639a62f.tar.gz
ChangeLogTag:Fri Mar 02 12:24:27 2001 Steve Huston <shuston@riverace.com>
-rw-r--r--ChangeLog23
-rw-r--r--ChangeLogs/ChangeLog-02a23
-rw-r--r--ChangeLogs/ChangeLog-03a23
-rw-r--r--ace/Event_Handler.cpp6
-rw-r--r--ace/OS.i27
-rw-r--r--ace/Thread_Manager.cpp14
-rw-r--r--ace/config-hpux-10.x-hpc++.h15
7 files changed, 107 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index bcd4d068220..0cde4421234 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+Fri Mar 02 12:24:27 2001 Steve Huston <shuston@riverace.com>
+
+ * ace/config-hpux-10.x-hpc++.h: If compiling without exceptions
+ (+noeh) then don't set ACE_HAS_EXCEPTIONS (don't set
+ ACE_NEW_THROWS_EXCEPTIONS either).
+
+ * ace/Thread_Manager.cpp (join_thr): Moved the code for
+ ACE_HAS_PTHREADS_DRAFT4 that does a pthread_detach from here
+ to ACE_OS::thr_join (which this function calls) so that
+ ACE_Thread::join also causes a pthread_detach. This is needed
+ on Pthreads Draft 4 (HP-UX 10.x) to properly clean up the thread
+ storage and avoid leaking memory. Thanks to Vladimir Kondratiev
+ <vladimir.kondratiev@intel.com> for reporting this and providing
+ excellent test cases to help resolve it quickly.
+
+ * ace/OS.i (ACE_OS::thr_join): Added the code that was removed from
+ ACE_Thread_Manager::join_thr, above.
+
+ * ace/Event_Handler.cpp (~ACE_Event_Handler): Add an ACE_Errno_Guard
+ around purge_pending_notifications to prevent against an
+ ENOTSUP from purge_pending_notifications.
+
Thu Mar 1 17:02:10 2001 Darrell Brunsch <brunsch@uci.edu>
* bin/PerlACE/Process_Unix.pm:
@@ -1111,6 +1133,7 @@ Tue Feb 6 23:43:49 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
%s to be %*s since the string may not be nul terminated! Thanks
to Lu Yunhai <luyunhai@huawei.com> for reporting this.
+>>>>>>> 4.1657
Tue Feb 6 20:11:28 2001 Krishnakumar B <kitty@cs.wustl.edu>
* include/makeinclude/platform_sunos5_sunc++.GNU:
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index bcd4d068220..0cde4421234 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,25 @@
+Fri Mar 02 12:24:27 2001 Steve Huston <shuston@riverace.com>
+
+ * ace/config-hpux-10.x-hpc++.h: If compiling without exceptions
+ (+noeh) then don't set ACE_HAS_EXCEPTIONS (don't set
+ ACE_NEW_THROWS_EXCEPTIONS either).
+
+ * ace/Thread_Manager.cpp (join_thr): Moved the code for
+ ACE_HAS_PTHREADS_DRAFT4 that does a pthread_detach from here
+ to ACE_OS::thr_join (which this function calls) so that
+ ACE_Thread::join also causes a pthread_detach. This is needed
+ on Pthreads Draft 4 (HP-UX 10.x) to properly clean up the thread
+ storage and avoid leaking memory. Thanks to Vladimir Kondratiev
+ <vladimir.kondratiev@intel.com> for reporting this and providing
+ excellent test cases to help resolve it quickly.
+
+ * ace/OS.i (ACE_OS::thr_join): Added the code that was removed from
+ ACE_Thread_Manager::join_thr, above.
+
+ * ace/Event_Handler.cpp (~ACE_Event_Handler): Add an ACE_Errno_Guard
+ around purge_pending_notifications to prevent against an
+ ENOTSUP from purge_pending_notifications.
+
Thu Mar 1 17:02:10 2001 Darrell Brunsch <brunsch@uci.edu>
* bin/PerlACE/Process_Unix.pm:
@@ -1111,6 +1133,7 @@ Tue Feb 6 23:43:49 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
%s to be %*s since the string may not be nul terminated! Thanks
to Lu Yunhai <luyunhai@huawei.com> for reporting this.
+>>>>>>> 4.1657
Tue Feb 6 20:11:28 2001 Krishnakumar B <kitty@cs.wustl.edu>
* include/makeinclude/platform_sunos5_sunc++.GNU:
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index bcd4d068220..0cde4421234 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,25 @@
+Fri Mar 02 12:24:27 2001 Steve Huston <shuston@riverace.com>
+
+ * ace/config-hpux-10.x-hpc++.h: If compiling without exceptions
+ (+noeh) then don't set ACE_HAS_EXCEPTIONS (don't set
+ ACE_NEW_THROWS_EXCEPTIONS either).
+
+ * ace/Thread_Manager.cpp (join_thr): Moved the code for
+ ACE_HAS_PTHREADS_DRAFT4 that does a pthread_detach from here
+ to ACE_OS::thr_join (which this function calls) so that
+ ACE_Thread::join also causes a pthread_detach. This is needed
+ on Pthreads Draft 4 (HP-UX 10.x) to properly clean up the thread
+ storage and avoid leaking memory. Thanks to Vladimir Kondratiev
+ <vladimir.kondratiev@intel.com> for reporting this and providing
+ excellent test cases to help resolve it quickly.
+
+ * ace/OS.i (ACE_OS::thr_join): Added the code that was removed from
+ ACE_Thread_Manager::join_thr, above.
+
+ * ace/Event_Handler.cpp (~ACE_Event_Handler): Add an ACE_Errno_Guard
+ around purge_pending_notifications to prevent against an
+ ENOTSUP from purge_pending_notifications.
+
Thu Mar 1 17:02:10 2001 Darrell Brunsch <brunsch@uci.edu>
* bin/PerlACE/Process_Unix.pm:
@@ -1111,6 +1133,7 @@ Tue Feb 6 23:43:49 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
%s to be %*s since the string may not be nul terminated! Thanks
to Lu Yunhai <luyunhai@huawei.com> for reporting this.
+>>>>>>> 4.1657
Tue Feb 6 20:11:28 2001 Krishnakumar B <kitty@cs.wustl.edu>
* include/makeinclude/platform_sunos5_sunc++.GNU:
diff --git a/ace/Event_Handler.cpp b/ace/Event_Handler.cpp
index ebbd72c43aa..50d4f8c4596 100644
--- a/ace/Event_Handler.cpp
+++ b/ace/Event_Handler.cpp
@@ -3,6 +3,7 @@
#include "ace/Event_Handler.h"
#include "ace/Message_Block.h"
+#include "ace/OS_Errno.h"
#include "ace/Reactor.h"
#include "ace/Thread_Manager.h"
@@ -27,7 +28,10 @@ ACE_Event_Handler::~ACE_Event_Handler (void)
{
// ACE_TRACE ("ACE_Event_Handler::~ACE_Event_Handler");
if (this->reactor_ != 0)
- this->reactor_->purge_pending_notifications (this);
+ {
+ ACE_Errno_Guard guard (errno); // purge may get ENOTSUP
+ this->reactor_->purge_pending_notifications (this);
+ }
}
// Gets the file descriptor associated with this I/O device.
diff --git a/ace/OS.i b/ace/OS.i
index bd161d6d48d..350a5e4b061 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -7719,13 +7719,32 @@ ACE_OS::thr_join (ACE_hthread_t thr_handle,
int, -1);
# elif defined (ACE_HAS_PTHREADS)
# if defined (ACE_HAS_PTHREADS_DRAFT4) || defined (ACE_HAS_PTHREADS_DRAFT6)
+ int ace_result;
# if defined (ACE_LACKS_NULL_PTHREAD_STATUS)
void *temp;
- ACE_OSCALL_RETURN (::pthread_join (thr_handle,
- status == 0 ? &temp : status), int, -1);
+ ACE_OSCALL (::pthread_join (thr_handle,
+ status == 0 ? &temp : status),
+ int, -1, ace_result);
# else
- ACE_OSCALL_RETURN (::pthread_join (thr_handle, status), int, -1);
-# endif
+ ACE_OSCALL (::pthread_join (thr_handle, status), int, -1, ace_result);
+# endif /* ACE_LACKS_NULL_PTHREAD_STATUS */
+ // Joinable threads need to be detached after joining on Pthreads
+ // draft 4 (at least) to reclaim thread storage.
+# if defined (ACE_HAS_PTHREADS_DRAFT4)
+# if defined (HPUX_10)
+ // HP-UX DCE threads' pthread_detach will smash thr_id if it's just given
+ // as an argument. Since the id is still needed, give pthread_detach
+ // a junker to scribble on.
+ ACE_thread_t junker;
+ cma_handle_assign(&thr_handle, &junker);
+ ::pthread_detach (&junker);
+# else
+ ::pthread_detach (&thr_handle);
+# endif /* HPUX_10 */
+# endif /* ACE_HAS_PTHREADS_DRAFT4 */
+
+ return ace_result;
+
# else
ACE_OSCALL_RETURN (ACE_ADAPT_RETVAL (::pthread_join (thr_handle, status), ace_result_),
int, -1);
diff --git a/ace/Thread_Manager.cpp b/ace/Thread_Manager.cpp
index 433e2080f41..4fa0fdab0d0 100644
--- a/ace/Thread_Manager.cpp
+++ b/ace/Thread_Manager.cpp
@@ -952,20 +952,6 @@ ACE_Thread_Manager::join_thr (ACE_Thread_Descriptor *td, int)
return ACE_Thread::join (td->thr_handle_);
#else
int result = ACE_Thread::join (td->thr_handle_);
-
-# if defined (ACE_HAS_PTHREADS_DRAFT4) && defined (ACE_LACKS_SETDETACH)
-# if defined (HPUX_10)
- // HP-UX DCE threads' pthread_detach will smash thr_id if it's just given
- // as an argument. Since the id is still needed, give pthread_detach
- // a junker to scribble on.
- ACE_thread_t junker;
- cma_handle_assign(&td->thr_handle_, &junker);
- ::pthread_detach (&junker);
-# else
- ::pthread_detach (&td->thr_handle_);
-# endif /* HPUX_10 */
-# endif /* ACE_HAS_PTHREADS_DRAFT4 && ACE_LACKS_SETDETACH */
-
if (result != 0)
{
// Since the thread are being joined, we should
diff --git a/ace/config-hpux-10.x-hpc++.h b/ace/config-hpux-10.x-hpc++.h
index dfb63912c15..360b80082a4 100644
--- a/ace/config-hpux-10.x-hpc++.h
+++ b/ace/config-hpux-10.x-hpc++.h
@@ -47,7 +47,7 @@
# define volatile
#else // aC++ definitions
-
+
// Parts of TAO (at least) use __HP_aCC to detect this compiler, but the
// macro is not set until A.01.18. If it's not set, set it - it won't be an
// HP-advertised value, but we don't check the value/version - just whether
@@ -68,8 +68,10 @@
// Compiler can't handle calls like foo->operator T *()
# define ACE_HAS_BROKEN_CONVERSIONS
-// Compiler supports C++ exception handling
-# define ACE_HAS_EXCEPTIONS
+// Compiler supports C++ exception handling, unless we turned it off with +noeh
+# if !defined (__HPACC_NOEH)
+# define ACE_HAS_EXCEPTIONS
+# endif /* __HPACC_NOEH */
// Compiler enforces the "One Definition Rule"
# define ACE_HAS_ONE_DEFINITION_RULE
@@ -102,7 +104,10 @@
# define ACE_HAS_TEMPLATE_SPECIALIZATION
// Compiler's runtime new throws bad_alloc on out-of-memory condition.
-# define ACE_NEW_THROWS_EXCEPTIONS
+// If being compiled without exceptions though (+noeh), it doesn't.
+# if defined (ACE_HAS_EXCEPTIONS)
+# define ACE_NEW_THROWS_EXCEPTIONS
+# endif /* ACE_HAS_EXCEPTIONS */
#endif /* __cplusplus < 199707L */
@@ -118,7 +123,7 @@
// Compiler doesn't handle 'signed char' correctly (used in ace/IOStream.h)
#define ACE_LACKS_SIGNED_CHAR
-#include "ace/config-hpux-10.x.h" /* OS information */
+#include "ace/config-hpux-10.x.h" /* OS information */
#include "ace/post.h"
#endif /* ACE_CONFIG_H */