summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/Event_Service/Task_Manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/Event_Service/Task_Manager.cpp')
-rw-r--r--TAO/orbsvcs/Event_Service/Task_Manager.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/TAO/orbsvcs/Event_Service/Task_Manager.cpp b/TAO/orbsvcs/Event_Service/Task_Manager.cpp
new file mode 100644
index 00000000000..e90ee3682da
--- /dev/null
+++ b/TAO/orbsvcs/Event_Service/Task_Manager.cpp
@@ -0,0 +1,37 @@
+// $Id$
+
+#include "Task_Manager.h"
+#include "ReactorTask.h"
+
+#if ! defined (__ACE_INLINE__)
+#include "Task_Manager.i"
+#endif /* __ACE_INLINE__ */
+
+ACE_Task_Manager::ACE_Task_Manager()
+{
+ for (int x=0; x < ACE_Scheduler_MAX_PRIORITIES; x++)
+ {
+ reactorTasks[x] = 0;
+ }
+}
+
+void ACE_Task_Manager::initialize()
+{
+ for (int x=0; x < ACE_Scheduler_MAX_PRIORITIES; x++)
+ {
+ RtecScheduler::Period tv = ACE_Scheduler_Rates[x];
+ reactorTasks[x] = new ReactorTask;
+ if (reactorTasks[x] == 0 ||
+ reactorTasks[x]->open_reactor (tv) == -1)
+ {
+ ACE_ERROR ((LM_ERROR, "%p.\n", "ACE_ORB::initialize_reactors"));
+ return;
+ }
+ }
+}
+
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+template class ACE_Singleton<ACE_Task_Manager,ACE_SYNCH_MUTEX>;
+#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+#pragma instantiate class ACE_Singleton<ACE_Task_Manager,ACE_SYNCH_MUTEX>
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */