summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-10 15:49:42 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-10 15:49:42 +0000
commit298e65d33ee71a734249aba81e3d2832681f9013 (patch)
tree1e1138ee8a9b8007302a900d82acade790477229 /TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp
parentcb1b20d0308cdb0c08ac2fd3258d342953ca65bd (diff)
downloadATCD-298e65d33ee71a734249aba81e3d2832681f9013.tar.gz
ChangeLogTag:Wed Jun 10 10:28:31 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp')
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp54
1 files changed, 33 insertions, 21 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp b/TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp
index 836ae2d70e6..ed03bd5bc73 100644
--- a/TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp
@@ -84,10 +84,21 @@ ACE_RT_Task::~ACE_RT_Task (void)
int
ACE_RT_Task::svc (void)
{
- // @@ TODO It may be necessary to call ORB init here...
-
TAO_TRY
{
+ // @@ TODO It may be necessary to pass the options to this class
+
+#if 0
+ static char* const argv[] = {
+ "task",
+ "-ORBport", "0",
+ };
+ int argc = sizeof (argv)/sizeof (argv[0]);
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv, "", TAO_TRY_ENV);
+ TAO_CHECK_ENV;
+#endif
+
RtecScheduler::OS_Priority thread_priority;
RtecScheduler::Preemption_Subpriority subpriority;
RtecScheduler::Preemption_Priority preemption_priority;
@@ -100,35 +111,36 @@ ACE_RT_Task::svc (void)
TAO_CHECK_ENV;
if (ACE_OS::thr_setprio (thread_priority) == -1)
{
- ACE_ERROR ((LM_ERROR, "(%P|%t) main thr_setprio failed\n"));
+ ACE_ERROR ((LM_ERROR, "(%P|%t) RT_Task thr_setprio failed\n"));
}
- }
- TAO_CATCHANY
- {
- ACE_ERROR_RETURN ((LM_ERROR, "priority failed\n"), -1);
- }
- TAO_ENDTRY;
- int done = 0;
+ int done = 0;
+
+ ACE_hthread_t self;
+ ACE_OS::thr_self (self);
- ACE_hthread_t self;
- ACE_OS::thr_self (self);
+ int priority;
+ if (ACE_OS::thr_getprio (self, priority) == 0)
+ ACE_DEBUG ((LM_DEBUG, "(%t) new thread priority = %d.\n", priority));
- int priority;
- if (ACE_OS::thr_getprio (self, priority) == 0)
- ACE_DEBUG ((LM_DEBUG, "(%t) new thread priority = %d.\n", priority));
+ // Initialize channel thread-specific data.
+ ACE_ES_Memory_Pools::thr_init ();
- // Initialize channel thread-specific data.
- ACE_ES_Memory_Pools::thr_init ();
+ done = this->svc_hook (priority);
- done = this->svc_hook (priority);
+ while (!done)
+ {
+ done = this->svc_one ();
+ }
- while (!done)
+ ACE_DEBUG ((LM_DEBUG, "(%t) thread exiting.\n"));
+ }
+ TAO_CATCHANY
{
- done = this->svc_one ();
+ ACE_ERROR_RETURN ((LM_ERROR, "priority failed\n"), -1);
}
+ TAO_ENDTRY;
- ACE_DEBUG ((LM_DEBUG, "(%t) thread exiting.\n"));
return 0;
}