summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-10-22 19:09:11 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-10-22 19:09:11 +0000
commitc986d3b7bee0990edab69c66f73734f438db1e3d (patch)
tree1b5ca2a91559b3382b6d0dc4baa6312cfea8771e
parentd62833e8dfe9a979bab44b1aff09a218768b6514 (diff)
downloadATCD-c986d3b7bee0990edab69c66f73734f438db1e3d.tar.gz
ChangeLogTag:Tue Oct 22 13:11:42 2002 Nanbor Wang <nanbor@cs.wustl.edu>
-rw-r--r--ChangeLog18
-rw-r--r--ChangeLogs/ChangeLog-03a18
-rw-r--r--ace/OS.cpp7
-rw-r--r--ace/config-win32-common.h4
4 files changed, 44 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index b715a1bc726..b8711b2cdfd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+Tue Oct 22 13:11:42 2002 Nanbor Wang <nanbor@cs.wustl.edu>
+
+ * ace/OS.cpp (DllMain): Added code to invoke
+ DisableThreadLibraryCalls during PROCESS_ATTACH when
+ ACE_DISABLES_THREAD_LIBRARY_CALLS is defined to 1 as described
+ below. This should enhance performance of applications that
+ spawn a lot of threads. Thanks to Patrick McNerthney
+ <pat@mcnerthney.com> for suggesting the change.
+
+ We should probably apply the same optimization for the core TAO
+ libraries.
+
+ * ace/config-win32-common.h: Defined a Win32-only new macros
+ ACE_DISABLES_THREAD_LIBRARY_CALLS which is default to 0 if not
+ defined by users.
+
Mon Oct 21 17:26:15 2002 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
* ace/SPIPE_Acceptor.cpp: Modified
@@ -18,7 +34,7 @@ Mon Oct 21 20:13:27 2002 Balachandran Natarajan <bala@isis-server.isis.vanderb
* examples/C++NPv2/Reactor_Logging_Server_T.cpp:
* examples/C++NPv1/Logging_Server.cpp:
* examples/C++NPv1/Process_Per_Connection_Logging_Server.cpp:
- * examples/C++NPv1/RT_Thread_Per_Connection_Logging_Server.cpp:
+ * examples/C++NPv1/RT_Thread_Per_Connection_Logging_Server.cpp:
* examples/C++NPv1/Thread_Per_Connection_Logging_Server.cpp:
Fix for compile errors on Lynx platform. Thanks to Craig
Rodrigues for supplying the patches.
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index b715a1bc726..b8711b2cdfd 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,19 @@
+Tue Oct 22 13:11:42 2002 Nanbor Wang <nanbor@cs.wustl.edu>
+
+ * ace/OS.cpp (DllMain): Added code to invoke
+ DisableThreadLibraryCalls during PROCESS_ATTACH when
+ ACE_DISABLES_THREAD_LIBRARY_CALLS is defined to 1 as described
+ below. This should enhance performance of applications that
+ spawn a lot of threads. Thanks to Patrick McNerthney
+ <pat@mcnerthney.com> for suggesting the change.
+
+ We should probably apply the same optimization for the core TAO
+ libraries.
+
+ * ace/config-win32-common.h: Defined a Win32-only new macros
+ ACE_DISABLES_THREAD_LIBRARY_CALLS which is default to 0 if not
+ defined by users.
+
Mon Oct 21 17:26:15 2002 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
* ace/SPIPE_Acceptor.cpp: Modified
@@ -18,7 +34,7 @@ Mon Oct 21 20:13:27 2002 Balachandran Natarajan <bala@isis-server.isis.vanderb
* examples/C++NPv2/Reactor_Logging_Server_T.cpp:
* examples/C++NPv1/Logging_Server.cpp:
* examples/C++NPv1/Process_Per_Connection_Logging_Server.cpp:
- * examples/C++NPv1/RT_Thread_Per_Connection_Logging_Server.cpp:
+ * examples/C++NPv1/RT_Thread_Per_Connection_Logging_Server.cpp:
* examples/C++NPv1/Thread_Per_Connection_Logging_Server.cpp:
Fix for compile errors on Lynx platform. Thanks to Craig
Rodrigues for supplying the patches.
diff --git a/ace/OS.cpp b/ace/OS.cpp
index 31885a4d150..6ec621d7cd8 100644
--- a/ace/OS.cpp
+++ b/ace/OS.cpp
@@ -44,7 +44,12 @@ HINSTANCE ACE_OS::win32_resource_module_;
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID)
{
if (reason == DLL_PROCESS_ATTACH)
- ACE_OS::set_win32_resource_module(instance);
+ {
+#if defined (ACE_DISABLES_THREAD_LIBRARY_CALLS) && (ACE_DISABLES_THREAD_LIBRARY_CALLS == 1)
+ ::DisableThreadLibraryCalls (instance);
+#endif /* ACE_DISABLES_THREAD_LIBRARY_CALLS */
+ ACE_OS::set_win32_resource_module(instance);
+ }
return TRUE;
}
# endif /* ACE_OS_HAS_DLL && ACE_OS_HAS_DLL == 1 */
diff --git a/ace/config-win32-common.h b/ace/config-win32-common.h
index e566d78c46f..1b95bd6f14f 100644
--- a/ace/config-win32-common.h
+++ b/ace/config-win32-common.h
@@ -512,5 +512,9 @@ typedef unsigned long long ACE_UINT64;
# define ACE_MALLOC_ALIGN 8
#endif /* ACE_WIN64 */
+#if !defined (ACE_DISABLES_THREAD_LIBRARY_CALLS)
+# define ACE_DISABLES_THREAD_LIBRARY_CALLS 0
+#endif /* ACE_DISABLES_THREAD_LIBRARY_CALLS */
+
#include "ace/post.h"
#endif /* ACE_CONFIG_WIN32_COMMON_H */