summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--ChangeLogs/ChangeLog-02a9
-rw-r--r--ChangeLogs/ChangeLog-03a9
-rw-r--r--examples/Map_Manager/test_hash_map_manager.cpp50
-rw-r--r--examples/Misc/test_trace.cpp13
-rw-r--r--performance-tests/Misc/test_singleton.cpp16
-rw-r--r--performance-tests/Misc/test_singleton.h2
7 files changed, 71 insertions, 37 deletions
diff --git a/ChangeLog b/ChangeLog
index 1b5fb1dd28d..972cae02fb6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Wed Dec 27 11:11:02 2000 Carlos O'Ryan <coryan@uci.edu>
+
+ * examples/Map_Manager/test_hash_map_manager.cpp:
+ * examples/Misc/test_trace.cpp:
+ * performance-tests/Misc/test_singleton.h:
+ * performance-tests/Misc/test_singleton.cpp:
+ Fixed problems in single threaded builds, basically I use the
+ ACE_SYNCH_* macros instead of using the class directly.
+
Tue Dec 26 18:53:06 2000 Carlos O'Ryan <coryan@uci.edu>
* performance-tests/Server_Concurrency/Makefile:
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index 1b5fb1dd28d..972cae02fb6 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,12 @@
+Wed Dec 27 11:11:02 2000 Carlos O'Ryan <coryan@uci.edu>
+
+ * examples/Map_Manager/test_hash_map_manager.cpp:
+ * examples/Misc/test_trace.cpp:
+ * performance-tests/Misc/test_singleton.h:
+ * performance-tests/Misc/test_singleton.cpp:
+ Fixed problems in single threaded builds, basically I use the
+ ACE_SYNCH_* macros instead of using the class directly.
+
Tue Dec 26 18:53:06 2000 Carlos O'Ryan <coryan@uci.edu>
* performance-tests/Server_Concurrency/Makefile:
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index 1b5fb1dd28d..972cae02fb6 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,12 @@
+Wed Dec 27 11:11:02 2000 Carlos O'Ryan <coryan@uci.edu>
+
+ * examples/Map_Manager/test_hash_map_manager.cpp:
+ * examples/Misc/test_trace.cpp:
+ * performance-tests/Misc/test_singleton.h:
+ * performance-tests/Misc/test_singleton.cpp:
+ Fixed problems in single threaded builds, basically I use the
+ ACE_SYNCH_* macros instead of using the class directly.
+
Tue Dec 26 18:53:06 2000 Carlos O'Ryan <coryan@uci.edu>
* performance-tests/Server_Concurrency/Makefile:
diff --git a/examples/Map_Manager/test_hash_map_manager.cpp b/examples/Map_Manager/test_hash_map_manager.cpp
index caa02acab44..ce9d79e219b 100644
--- a/examples/Map_Manager/test_hash_map_manager.cpp
+++ b/examples/Map_Manager/test_hash_map_manager.cpp
@@ -9,7 +9,7 @@ ACE_RCSID(Map_Manager, test_hash_map_manager, "$Id$")
const int MAX_KEY_LEN = 1000;
-typedef ACE_Hash_Map_Manager<ACE_CString, ACE_CString, ACE_RW_Mutex> MAP_MANAGER;
+typedef ACE_Hash_Map_Manager<ACE_CString, ACE_CString, ACE_SYNCH_RW_MUTEX> MAP_MANAGER;
int
main (int argc, char *argv[])
@@ -76,27 +76,35 @@ main (int argc, char *argv[])
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Guard<ACE_RW_Mutex>;
-template class ACE_Read_Guard<ACE_RW_Mutex>;
-template class ACE_Write_Guard<ACE_RW_Mutex>;
+
+#if defined(ACE_HAS_THREADS)
+template class ACE_Guard<ACE_SYNCH_RW_MUTEX>;
+template class ACE_Read_Guard<ACE_SYNCH_RW_MUTEX>;
+template class ACE_Write_Guard<ACE_SYNCH_RW_MUTEX>;
+#endif /* ACE_HAS_THREADS */
+
template class ACE_Hash_Map_Entry<ACE_CString, ACE_CString>;
-template class ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_RW_Mutex>;
-template class ACE_Hash_Map_Iterator<ACE_CString, ACE_CString, ACE_RW_Mutex>;
-template class ACE_Hash_Map_Iterator_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_RW_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator<ACE_CString, ACE_CString, ACE_RW_Mutex>;
-template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_RW_Mutex>;
-template class ACE_Hash_Map_Manager<ACE_CString, ACE_CString, ACE_RW_Mutex>;
-template class ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_RW_Mutex>;
+template class ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_SYNCH_RW_MUTEX>;
+template class ACE_Hash_Map_Iterator<ACE_CString, ACE_CString, ACE_SYNCH_RW_MUTEX>;
+template class ACE_Hash_Map_Iterator_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_SYNCH_RW_MUTEX>;
+template class ACE_Hash_Map_Reverse_Iterator<ACE_CString, ACE_CString, ACE_SYNCH_RW_MUTEX>;
+template class ACE_Hash_Map_Reverse_Iterator_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_SYNCH_RW_MUTEX>;
+template class ACE_Hash_Map_Manager<ACE_CString, ACE_CString, ACE_SYNCH_RW_MUTEX>;
+template class ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_SYNCH_RW_MUTEX>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Guard<ACE_RW_Mutex>
-#pragma instantiate ACE_Read_Guard<ACE_RW_Mutex>
-#pragma instantiate ACE_Write_Guard<ACE_RW_Mutex>
+
+#if defined(ACE_HAS_THREADS)
+#pragma instantiate ACE_Guard<ACE_SYNCH_RW_MUTEX>
+#pragma instantiate ACE_Read_Guard<ACE_SYNCH_RW_MUTEX>
+#pragma instantiate ACE_Write_Guard<ACE_SYNCH_RW_MUTEX>
+#endif /* ACE_HAS_THREADS */
+
#pragma instantiate ACE_Hash_Map_Entry<ACE_CString, ACE_CString>
-#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_RW_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator<ACE_CString, ACE_CString, ACE_RW_Mutex>
-#pragma instantiate ACE_Hash_Map_Iterator_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_RW_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator<ACE_CString, ACE_CString, ACE_RW_Mutex>
-#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_RW_Mutex>
-#pragma instantiate ACE_Hash_Map_Manager<ACE_CString, ACE_CString, ACE_RW_Mutex>
-#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_RW_Mutex>
+#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_SYNCH_RW_MUTEX>
+#pragma instantiate ACE_Hash_Map_Iterator<ACE_CString, ACE_CString, ACE_SYNCH_RW_MUTEX>
+#pragma instantiate ACE_Hash_Map_Iterator_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_SYNCH_RW_MUTEX>
+#pragma instantiate ACE_Hash_Map_Reverse_Iterator<ACE_CString, ACE_CString, ACE_SYNCH_RW_MUTEX>
+#pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_SYNCH_RW_MUTEX>
+#pragma instantiate ACE_Hash_Map_Manager<ACE_CString, ACE_CString, ACE_SYNCH_RW_MUTEX>
+#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_CString, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_SYNCH_RW_MUTEX>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/examples/Misc/test_trace.cpp b/examples/Misc/test_trace.cpp
index b4b3a985888..0d34d0d6ab3 100644
--- a/examples/Misc/test_trace.cpp
+++ b/examples/Misc/test_trace.cpp
@@ -13,8 +13,8 @@
// also illustrates how to redirect the output to a file.
//
// = AUTHOR
-// Douglas C. Schmidt <schmidt@cs.wustl.edu> and
-// Irfan Pyarali <irfan@cs.wustl.edu>
+// Douglas C. Schmidt <schmidt@cs.wustl.edu> and
+// Irfan Pyarali <irfan@cs.wustl.edu>
//
// ============================================================================
@@ -39,7 +39,7 @@ public:
ACE_Trace _ ("int recursive (size_t depth)",
__LINE__,
__FILE__);
-
+
if (depth > 0)
return recursive (depth - 1);
else
@@ -58,14 +58,14 @@ private:
};
extern "C"
-void
+void
exithook (void)
{
ACE_DEBUG ((LM_DEBUG,
"we're outta here!\n"));
}
-int
+int
main (int argc, char *argv[])
{
const size_t MAX_DEPTH = argc == 1 ? 10 : atoi (argv[1]);
@@ -103,11 +103,10 @@ main (int argc, char *argv[])
#else
const int MAX_ITERATIONS = argc > 3 ? ACE_OS::atoi (argv[3]) : 10;
- for (size_t i = 0; i < MAX_ITERATIONS; i++)
+ for (int i = 0; i < MAX_ITERATIONS; i++)
task.svc ();
#endif /* ACE_MT_SAFE */
// Destructor automatically called.
return 0;
}
-
diff --git a/performance-tests/Misc/test_singleton.cpp b/performance-tests/Misc/test_singleton.cpp
index 9e8a50b56e1..5b59bc55686 100644
--- a/performance-tests/Misc/test_singleton.cpp
+++ b/performance-tests/Misc/test_singleton.cpp
@@ -48,11 +48,11 @@ public:
static Mutex_Singleton *instance (void);
private:
- static ACE_Thread_Mutex lock_;
+ static ACE_SYNCH_MUTEX lock_;
static Mutex_Singleton *instance_;
};
-ACE_Thread_Mutex Mutex_Singleton::lock_;
+ACE_SYNCH_MUTEX Mutex_Singleton::lock_;
Mutex_Singleton *Mutex_Singleton::instance_;
@@ -60,7 +60,7 @@ Mutex_Singleton *
Mutex_Singleton::instance (void)
{
// Acquire the lock every time in.
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, Mutex_Singleton::lock_, 0);
+ ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, Mutex_Singleton::lock_, 0);
if (Mutex_Singleton::instance_ == 0)
ACE_NEW_RETURN (Mutex_Singleton::instance_, Mutex_Singleton, 0);
@@ -68,7 +68,7 @@ Mutex_Singleton::instance (void)
return Mutex_Singleton::instance_;
}
-ACE_Thread_Mutex DC_Singleton::lock_;
+ACE_SYNCH_MUTEX DC_Singleton::lock_;
DC_Singleton *DC_Singleton::instance_;
@@ -78,7 +78,7 @@ DC_Singleton::instance (void)
if (DC_Singleton::instance_ == 0)
{
// Only lock if instance_ isn't 0.
- ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, DC_Singleton::lock_, 0);
+ ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, DC_Singleton::lock_, 0);
// Perform the Double-Check.
if (DC_Singleton::instance_ == 0)
@@ -88,7 +88,7 @@ DC_Singleton::instance (void)
return DC_Singleton::instance_;
}
-typedef ACE_Singleton <DC_Singleton, ACE_Thread_Mutex> My_Singleton;
+typedef ACE_Singleton <DC_Singleton, ACE_SYNCH_MUTEX> My_Singleton;
int
main (int argc, char *argv[])
@@ -162,9 +162,9 @@ main (int argc, char *argv[])
}
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Singleton<DC_Singleton, ACE_Thread_Mutex>;
+template class ACE_Singleton<DC_Singleton, ACE_SYNCH_MUTEX>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Singleton<DC_Singleton, ACE_Thread_Mutex>
+#pragma instantiate ACE_Singleton<DC_Singleton, ACE_SYNCH_MUTEX>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
diff --git a/performance-tests/Misc/test_singleton.h b/performance-tests/Misc/test_singleton.h
index 20dcfd2bf32..dbbfac996e4 100644
--- a/performance-tests/Misc/test_singleton.h
+++ b/performance-tests/Misc/test_singleton.h
@@ -17,7 +17,7 @@ public:
static DC_Singleton *instance (void);
private:
- static ACE_Thread_Mutex lock_;
+ static ACE_SYNCH_MUTEX lock_;
static DC_Singleton *instance_;
};