summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-27 21:13:11 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-27 21:13:11 +0000
commit7590e3ca3cb6a114ee02e36a24d99748b989e6c1 (patch)
treef83f8e91804347cbeef91b79ac8e6075e257e7d1
parent325f2dcc70237bd21f63724f7dc9bd41eedeaa94 (diff)
downloadATCD-7590e3ca3cb6a114ee02e36a24d99748b989e6c1.tar.gz
*** empty log message ***
-rw-r--r--ace/Timeprobe.cpp36
-rw-r--r--ace/Timeprobe.h30
2 files changed, 34 insertions, 32 deletions
diff --git a/ace/Timeprobe.cpp b/ace/Timeprobe.cpp
index 2f894fe1cd9..30f53032f69 100644
--- a/ace/Timeprobe.cpp
+++ b/ace/Timeprobe.cpp
@@ -5,7 +5,7 @@
#include "ace/Timeprobe.h"
-#if defined (ACE_ENABLE_TIMEPROBES)
+#if defined (ACE_COMPILE_TIMEPROBES)
#if !defined (__ACE_INLINE__)
#include "ace/Timeprobe.i"
@@ -22,6 +22,10 @@ ACE_Timeprobe<ACE_LOCK>::ACE_Timeprobe (u_long size,
max_size_ (size),
current_size_ (0)
{
+ // This will calibrate the High_Res_Timers
+ ACE_High_Res_Timer calibrator;
+ ACE_UNUSED_ARG (calibrator);
+
void *space = this->allocator_->malloc ((sizeof (ACE_timeprobe_t)) * this->max_size_);
this->timeprobes_ = new ((ACE_timeprobe_t *) space) ACE_timeprobe_t[this->max_size_];
@@ -212,6 +216,34 @@ ACE_Function_Timeprobe<Timeprobe>::~ACE_Function_Timeprobe (void)
this->timeprobe_.timeprobe (this->event_ + 1);
}
-#endif /* ACE_ENABLE_TIMEPROBES */
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+template class ACE_Timeprobe<ACE_TIMEPROBE_MUTEX>;
+template class ACE_Function_Timeprobe<ACE_Timeprobe<ACE_TIMEPROBE_MUTEX> >;
+template class ACE_Unbounded_Set_Iterator<ACE_Event_Descriptions>;
+template class ACE_Unbounded_Set<ACE_Event_Descriptions>;
+template class ACE_Node<ACE_Event_Descriptions>;
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+#pragma instantiate ACE_Timeprobe<ACE_TIMEPROBE_MUTEX>
+#pragma instantiate ACE_Function_Timeprobe<ACE_Timeprobe<ACE_TIMEPROBE_MUTEX> >
+#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Event_Descriptions>
+#pragma instantiate ACE_Unbounded_Set<ACE_Event_Descriptions>
+#pragma instantiate ACE_Node<ACE_Event_Descriptions>
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+
+# if defined (ACE_TSS_TIMEPROBES)
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+template class ACE_TSS_Singleton<ACE_TIMEPROBE_WITH_LOCKING, ACE_SYNCH_NULL_MUTEX>;
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+#pragma instantiate ACE_TSS_Singleton<ACE_TIMEPROBE_WITH_LOCKING, ACE_SYNCH_NULL_MUTEX>;
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+# else /* ACE_TSS_TIMEPROBES */
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+template class ACE_Singleton<ACE_TIMEPROBE_WITH_LOCKING, ACE_SYNCH_MUTEX>;
+#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+#pragma instantiate ACE_Singleton<ACE_TIMEPROBE_WITH_LOCKING, ACE_SYNCH_MUTEX>;
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+# endif /* ACE_TSS_TIMEPROBES */
+
+#endif /* ACE_COMPILE_TIMEPROBES */
#endif /* ACE_TIMEPROBE_C */
diff --git a/ace/Timeprobe.h b/ace/Timeprobe.h
index 114d3d38c78..41accd376a4 100644
--- a/ace/Timeprobe.h
+++ b/ace/Timeprobe.h
@@ -213,44 +213,14 @@ typedef ACE_SYNCH_NULL_MUTEX ACE_TIMEPROBE_MUTEX;
typedef ACE_Timeprobe<ACE_TIMEPROBE_MUTEX> ACE_TIMEPROBE_WITH_LOCKING;
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Timeprobe<ACE_TIMEPROBE_MUTEX>;
-template class ACE_Function_Timeprobe<ACE_Timeprobe<ACE_TIMEPROBE_MUTEX> >;
-template class ACE_Unbounded_Set_Iterator<ACE_Event_Descriptions>;
-template class ACE_Unbounded_Set<ACE_Event_Descriptions>;
-template class ACE_Node<ACE_Event_Descriptions>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Timeprobe<ACE_TIMEPROBE_MUTEX>
-#pragma instantiate ACE_Function_Timeprobe<ACE_Timeprobe<ACE_TIMEPROBE_MUTEX> >
-#pragma instantiate ACE_Unbounded_Set_Iterator<ACE_Event_Descriptions>
-#pragma instantiate ACE_Unbounded_Set<ACE_Event_Descriptions>
-#pragma instantiate ACE_Node<ACE_Event_Descriptions>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
// If ACE_TSS_TIMEPROBES is defined, store the ACE_Timeprobe singleton
// in thread specific storage. This allows multiple threads to use
// their own instance of ACE_Timerprobe, without interfering with each
// other.
# if defined (ACE_TSS_TIMEPROBES)
-
typedef ACE_TSS_Singleton<ACE_TIMEPROBE_WITH_LOCKING, ACE_SYNCH_NULL_MUTEX> ACE_TIMEPROBE_SINGLETON;
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_TSS_Singleton<ACE_TIMEPROBE_WITH_LOCKING, ACE_SYNCH_NULL_MUTEX>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_TSS_Singleton<ACE_TIMEPROBE_WITH_LOCKING, ACE_SYNCH_NULL_MUTEX>;
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
# else /* ACE_TSS_TIMEPROBES */
-
typedef ACE_Singleton<ACE_TIMEPROBE_WITH_LOCKING, ACE_SYNCH_MUTEX> ACE_TIMEPROBE_SINGLETON;
-
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-template class ACE_Singleton<ACE_TIMEPROBE_WITH_LOCKING, ACE_SYNCH_MUTEX>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#pragma instantiate ACE_Singleton<ACE_TIMEPROBE_WITH_LOCKING, ACE_SYNCH_MUTEX>;
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
# endif /* ACE_TSS_TIMEPROBES */
#endif /* ACE_COMPILE_TIMEPROBES */