diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2004-06-14 07:04:09 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2004-06-14 07:04:09 +0000 |
commit | 5ebd70d3041e54c73197dcc6a9a6a84afa4be2c0 (patch) | |
tree | d25dc86ff4bc8da0be0ab96f115e1cb09c6bbce0 /TAO/tests/RTScheduling | |
parent | d5abf1d67bd62aa2ea7b47a32e2092e44d662117 (diff) | |
download | ATCD-5ebd70d3041e54c73197dcc6a9a6a84afa4be2c0.tar.gz |
ChangeLogTag: Mon Jun 14 06:57:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/tests/RTScheduling')
-rw-r--r-- | TAO/tests/RTScheduling/Thread_Cancel/test.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/TAO/tests/RTScheduling/Thread_Cancel/test.cpp b/TAO/tests/RTScheduling/Thread_Cancel/test.cpp index cca30cda99a..c2288510263 100644 --- a/TAO/tests/RTScheduling/Thread_Cancel/test.cpp +++ b/TAO/tests/RTScheduling/Thread_Cancel/test.cpp @@ -1,5 +1,7 @@ -//$Id$ +// $Id$ + #include "Thread_Task.h" +#include "ace/OS_NS_unistd.h" #include "../Scheduler.h" #include "tao/RTScheduling/RTScheduler_Manager.h" #include "tao/ORB_Core.h" @@ -19,17 +21,17 @@ main (int argc, char* argv []) CORBA::Object_ptr manager_obj = orb->resolve_initial_references ("RTSchedulerManager" ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - + TAO_RTScheduler_Manager_var manager = TAO_RTScheduler_Manager::_narrow (manager_obj ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - + TAO_Scheduler scheduler (orb.in ()); - + manager->rtscheduler (&scheduler); - + Thread_Task task; - + task.activate_task (orb.in ()); ACE_DEBUG ((LM_DEBUG, @@ -45,11 +47,11 @@ main (int argc, char* argv []) CORBA::Object_ptr current_obj = orb->resolve_initial_references ("RTScheduler_Current" ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + RTScheduling::Current_var current = RTScheduling::Current::_narrow (current_obj ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; - + for (int i = 0; i < 4; i++) { RTScheduling::DistributableThread_var DT = current->lookup ((task.guids ())[i] @@ -69,8 +71,8 @@ main (int argc, char* argv []) "Caught exception:"); return 1; } - ACE_ENDTRY; - + ACE_ENDTRY; + return 0; } |