diff options
Diffstat (limited to 'TAO/examples/RTScheduling/DT_Creator.cpp')
-rw-r--r-- | TAO/examples/RTScheduling/DT_Creator.cpp | 51 |
1 files changed, 11 insertions, 40 deletions
diff --git a/TAO/examples/RTScheduling/DT_Creator.cpp b/TAO/examples/RTScheduling/DT_Creator.cpp index a0ae68a61ce..37caa034f69 100644 --- a/TAO/examples/RTScheduling/DT_Creator.cpp +++ b/TAO/examples/RTScheduling/DT_Creator.cpp @@ -172,7 +172,7 @@ DT_Creator::init (int argc, char *argv []) } void -DT_Creator::register_synch_obj (ACE_ENV_SINGLE_ARG_DECL) +DT_Creator::register_synch_obj (void) { CosNaming::Name name (1); name.length (1); @@ -187,7 +187,6 @@ DT_Creator::register_synch_obj (ACE_ENV_SINGLE_ARG_DECL) synch_context = this->naming_->bind_new_context (name ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // // We reach here if there was no exception raised in @@ -209,13 +208,11 @@ DT_Creator::register_synch_obj (ACE_ENV_SINGLE_ARG_DECL) CORBA::Object_var object = this->naming_->resolve (name ACE_ENV_ARG_PARAMETER); - ACE_CHECK; synch_context = CosNaming::NamingContext::_narrow (object.in ()); } ACE_ENDTRY; - ACE_CHECK; ACE_CString synch_name ("Synch"); ACE_Time_Value timestamp = ACE_OS::gettimeofday (); @@ -233,43 +230,37 @@ DT_Creator::register_synch_obj (ACE_ENV_SINGLE_ARG_DECL) ACE_NEW (synch_, Synch_i); - Synch_var synch = synch_->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + Synch_var synch = synch_->_this (); // Register the synch object with the Synch context. synch_context->rebind (name, synch.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } int -DT_Creator::activate_root_poa (ACE_ENV_SINGLE_ARG_DECL) +DT_Creator::activate_root_poa (void) { CORBA::Object_var object = orb_->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); root_poa_ = PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); PortableServer::POAManager_var poa_manager = - root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + root_poa_->the_POAManager (); - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + poa_manager->activate (); return 0; } void -DT_Creator::activate_poa_list (ACE_ENV_SINGLE_ARG_DECL) +DT_Creator::activate_poa_list (void) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, @@ -280,24 +271,21 @@ DT_Creator::activate_poa_list (ACE_ENV_SINGLE_ARG_DECL) CORBA::Object_var object = orb_->resolve_initial_references ("RTORB" ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->rt_orb_ = RTCORBA::RTORB::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } for (int i = 0; i < poa_count_; ++i) { poa_list_[i]->activate (this->rt_orb_.in(), this->root_poa_.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } } void -DT_Creator::activate_job_list (ACE_ENV_SINGLE_ARG_DECL) +DT_Creator::activate_job_list (void) { if (TAO_debug_level > 0) @@ -317,7 +305,6 @@ DT_Creator::activate_job_list (ACE_ENV_SINGLE_ARG_DECL) PortableServer::POA_var host_poa = root_poa_->find_POA (job->poa ().c_str (), 0 ACE_ENV_ARG_PARAMETER); - ACE_CHECK; PortableServer::ServantBase_var servant_var (job); @@ -326,29 +313,24 @@ DT_Creator::activate_job_list (ACE_ENV_SINGLE_ARG_DECL) id = host_poa->activate_object (job ACE_ENV_ARG_PARAMETER); - ACE_CHECK; CORBA::Object_var server = host_poa->id_to_reference (id.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; CORBA::String_var ior = orb_->object_to_string (server.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; const ACE_CString &job_name = job->name (); CosNaming::Name_var name = this->naming_->to_name (job_name.c_str () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->naming_->rebind (name.in (), server.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } /* while */ @@ -358,7 +340,7 @@ DT_Creator::activate_job_list (ACE_ENV_SINGLE_ARG_DECL) } void -DT_Creator::activate_schedule (ACE_ENV_SINGLE_ARG_DECL) +DT_Creator::activate_schedule (void) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, @@ -380,10 +362,8 @@ DT_Creator::activate_schedule (ACE_ENV_SINGLE_ARG_DECL) CORBA::Object_var obj = this->naming_->resolve (name ACE_ENV_ARG_PARAMETER); - ACE_CHECK; Job_var job = Job::_narrow (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; // if (TAO_debug_level > 0) // { @@ -392,12 +372,10 @@ DT_Creator::activate_schedule (ACE_ENV_SINGLE_ARG_DECL) CORBA::Policy_var policy = job->_get_policy (RTCORBA::PRIORITY_MODEL_POLICY_TYPE ACE_ENV_ARG_PARAMETER); - ACE_CHECK; RTCORBA::PriorityModelPolicy_var priority_policy = RTCORBA::PriorityModelPolicy::_narrow (policy.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; if (CORBA::is_nil (priority_policy.in ())) ACE_DEBUG ((LM_DEBUG, @@ -406,8 +384,7 @@ DT_Creator::activate_schedule (ACE_ENV_SINGLE_ARG_DECL) { /* RTCORBA::PriorityModel priority_model = - priority_policy->priority_model (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + priority_policy->priority_model (); if (priority_model == RTCORBA::CLIENT_PROPAGATED) ACE_DEBUG ((LM_DEBUG, @@ -430,12 +407,11 @@ DT_Creator::activate_schedule (ACE_ENV_SINGLE_ARG_DECL) } int -DT_Creator::resolve_naming_service (ACE_ENV_SINGLE_ARG_DECL) +DT_Creator::resolve_naming_service (void) { CORBA::Object_var naming_obj = this->orb_->resolve_initial_references ("NameService" ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); // Need to check return value for errors. if (CORBA::is_nil (naming_obj.in ())) @@ -446,7 +422,6 @@ DT_Creator::resolve_naming_service (ACE_ENV_SINGLE_ARG_DECL) this->naming_ = CosNaming::NamingContextExt::_narrow (naming_obj.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); //@@tmp hack, otherwise crashes on exit!..?? CosNaming::NamingContextExt::_duplicate (this->naming_.in()); @@ -470,8 +445,7 @@ DT_Creator::create_distributable_threads (RTScheduling::Current_ptr current while (!this->synch ()->synched ()) { - this->orb_->perform_work (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->orb_->perform_work (); } CORBA::Policy_var sched_param; @@ -481,7 +455,6 @@ DT_Creator::create_distributable_threads (RTScheduling::Current_ptr current sched_param.in (), sched_param.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK; ACE_NEW (base_time_, ACE_Time_Value (*(this->synch ()->base_time ()))); @@ -519,7 +492,6 @@ DT_Creator::create_distributable_threads (RTScheduling::Current_ptr current flags, base_time_ ACE_ENV_ARG_PARAMETER); - ACE_CHECK; } @@ -527,7 +499,6 @@ DT_Creator::create_distributable_threads (RTScheduling::Current_ptr current current_->end_scheduling_segment (name ACE_ENV_ARG_PARAMETER); - ACE_CHECK; this->check_ifexit (); } |