diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2010-09-16 18:59:59 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2010-09-16 18:59:59 +0000 |
commit | b663e8fdfca9f8bb9705f500dbc392ab4383eeaa (patch) | |
tree | 1559d5a1d0d444ba178e868da4eee36be790e80f | |
parent | 7b57a5a4c1f6ef0b8c5f8ccd82a7759cd2f5a4c0 (diff) | |
download | ATCD-b663e8fdfca9f8bb9705f500dbc392ab4383eeaa.tar.gz |
ChangeLogTag: Thu Sep 16 18:59:25 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
40 files changed, 312 insertions, 241 deletions
diff --git a/ChangeLog b/ChangeLog index e5a61e05378..61f0f3214dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,48 @@ +Thu Sep 16 18:59:25 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu> + + * orbsvcs/orbsvcs/Sched/DynSched.cpp: + * orbsvcs/orbsvcs/Sched/Config_Scheduler.cpp: + * orbsvcs/orbsvcs/Sched/Reconfig_Sched_Utils_T.cpp: + * orbsvcs/orbsvcs/Sched/Config_Scheduler.h: + * orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.cpp: + * orbsvcs/orbsvcs/Sched/Scheduler.cpp: + * orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.h: + * orbsvcs/orbsvcs/RTSched.mpc: + * orbsvcs/orbsvcs/Runtime_Scheduler.cpp: + * orbsvcs/orbsvcs/Event/EC_Timeout_Generator.cpp: + * orbsvcs/orbsvcs/Event/EC_Default_ProxySupplier.cpp: + * orbsvcs/orbsvcs/Event/EC_Null_Scheduling.cpp: + * orbsvcs/orbsvcs/Event/EC_Type_Filter.cpp: + * orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp: + * orbsvcs/orbsvcs/Event/EC_Bitmask_Filter.cpp: + * orbsvcs/orbsvcs/Event/EC_Default_ProxyConsumer.cpp: + * orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.cpp: + * orbsvcs/orbsvcs/Event/EC_Masked_Type_Filter.cpp: + * orbsvcs/orbsvcs/Event/EC_Gateway_IIOP.cpp: + * orbsvcs/orbsvcs/Event/EC_Basic_Filter_Builder.cpp: + * orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.cpp: + * orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp: + * orbsvcs/orbsvcs/Event/EC_Dispatching_Task.inl: + * orbsvcs/orbsvcs/Event/ECG_UDP_Receiver.cpp: + * orbsvcs/orbsvcs/Event/EC_Conjunction_Filter.cpp: + * orbsvcs/orbsvcs/Event/EC_Prefix_Filter_Builder.cpp: + * orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp: + * orbsvcs/orbsvcs/Event/ECG_Mcast_Gateway.cpp: + * orbsvcs/orbsvcs/Event/EC_Priority_Scheduling.cpp: + * orbsvcs/orbsvcs/Event/ECG_Mcast_EH.cpp: + * orbsvcs/orbsvcs/Event/EC_Lifetime_Utils_T.cpp: + * orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp: + * orbsvcs/orbsvcs/Event/ECG_Mcast_Gateway.inl: + * orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.cpp: + * orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.cpp: + * orbsvcs/orbsvcs/Event/ECG_UDP_Sender.cpp: + * orbsvcs/orbsvcs/Scheduler_Factory.cpp: + * orbsvcs/orbsvcs/Runtime_Scheduler.h: + * orbsvcs/Event_Service/Event_Service.cpp: + + Changes to get the Event Service to build with the + alternate mapping. + Wed Sep 15 19:26:33 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu> * orbsvcs/orbsvcs/RTEvent.mpc: diff --git a/orbsvcs/Event_Service/Event_Service.cpp b/orbsvcs/Event_Service/Event_Service.cpp index 15addd75f99..3aeaf484ccd 100644 --- a/orbsvcs/Event_Service/Event_Service.cpp +++ b/orbsvcs/Event_Service/Event_Service.cpp @@ -196,11 +196,11 @@ Event_Service::run (int argc, ACE_TCHAR* argv[]) if (persistent != 0) { - policies.length (index++); + policies.resize (index++); policies[index] = root_poa->create_id_assignment_policy (PortableServer::USER_ID); - policies.length (index++); + policies.resize (index++); policies[index] = root_poa->create_lifespan_policy (PortableServer::PERSISTENT); } @@ -209,7 +209,7 @@ Event_Service::run (int argc, ACE_TCHAR* argv[]) { CORBA::Any pol; pol <<= BiDirPolicy::BOTH; - policies.length (index++); + policies.resize (index++); policies[index] = this->orb_->create_policy (BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE, pol); @@ -223,7 +223,7 @@ Event_Service::run (int argc, ACE_TCHAR* argv[]) // Creation of persistentPOA is over. Destroy the Policy objects. for (CORBA::ULong i = 0; - i < policies.length (); + i < policies.size (); ++i) { policies[i]->destroy (); @@ -234,13 +234,13 @@ Event_Service::run (int argc, ACE_TCHAR* argv[]) " (%P|%t) Unable to initialize the child POA.\n"), 1); - PortableServer::ObjectId_var ec_object_id = + PortableServer::ObjectId ec_object_id = PortableServer::string_to_ObjectId(object_id_.c_str()); - child_poa->activate_object_with_id(ec_object_id.in(), this); + child_poa->activate_object_with_id(ec_object_id, this); CORBA::Object_var ec_obj = - child_poa->id_to_reference(ec_object_id.in()); + child_poa->id_to_reference(ec_object_id); ec = RtecEventChannelAdmin::EventChannel::_narrow(ec_obj.in()); diff --git a/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.cpp b/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.cpp index 5933ad66272..f32f797fe64 100644 --- a/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.cpp +++ b/orbsvcs/orbsvcs/Event/ECG_Mcast_EH.cpp @@ -147,7 +147,7 @@ TAO_ECG_Mcast_EH::compute_required_subscriptions ( const RtecEventChannelAdmin::ConsumerQOS& sub, Address_Set& multicast_addresses) { - CORBA::ULong count = sub.dependencies.length (); + CORBA::ULong count = sub.dependencies.size (); for (CORBA::ULong i = 0; i != count; ++i) { const RtecEventComm::EventHeader& header = diff --git a/orbsvcs/orbsvcs/Event/ECG_Mcast_Gateway.cpp b/orbsvcs/orbsvcs/Event/ECG_Mcast_Gateway.cpp index ed6fa1eb620..5fc0d7271d2 100644 --- a/orbsvcs/orbsvcs/Event/ECG_Mcast_Gateway.cpp +++ b/orbsvcs/orbsvcs/Event/ECG_Mcast_Gateway.cpp @@ -502,7 +502,7 @@ TAO_ECG_Mcast_Gateway::init_sender ( TAO_EC_Auto_Command<UDP_Sender_Shutdown> sender_shutdown; sender_shutdown.set_command (UDP_Sender_Shutdown (sender)); - if (this->consumer_qos_.dependencies.length () > 0) + if (this->consumer_qos_.dependencies.size () > 0) { // Client supplied consumer qos. Use it. this->consumer_qos_.is_gateway = true; diff --git a/orbsvcs/orbsvcs/Event/ECG_Mcast_Gateway.inl b/orbsvcs/orbsvcs/Event/ECG_Mcast_Gateway.inl index 8dfc144f82c..958cef15009 100644 --- a/orbsvcs/orbsvcs/Event/ECG_Mcast_Gateway.inl +++ b/orbsvcs/orbsvcs/Event/ECG_Mcast_Gateway.inl @@ -16,7 +16,7 @@ TAO_ECG_Mcast_Gateway::TAO_ECG_Mcast_Gateway (void) , non_blocking_ (TAO_ECG_DEFAULT_NON_BLOCKING) , consumer_qos_ () { - this->consumer_qos_.dependencies.length (0); + this->consumer_qos_.dependencies.resize (0); } ACE_INLINE diff --git a/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp b/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp index 1a3c54d765e..c77b7331d64 100644 --- a/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp +++ b/orbsvcs/orbsvcs/Event/ECG_Reactive_ConsumerEC_Control.cpp @@ -81,7 +81,7 @@ TAO_ECG_Reactive_ConsumerEC_Control::handle_timeout ( // Query the state of the Current object *before* we initiate // the iteration... CORBA::PolicyTypeSeq types; - CORBA::PolicyList_var policies = + CORBA::PolicyList policies = this->policy_current_->get_policy_overrides (types); // Change the timeout @@ -91,9 +91,9 @@ TAO_ECG_Reactive_ConsumerEC_Control::handle_timeout ( // Query the state of the consumers... this->query_eventchannel (); - this->policy_current_->set_policy_overrides (policies.in (), + this->policy_current_->set_policy_overrides (policies, CORBA::SET_OVERRIDE); - for (CORBA::ULong i = 0; i != policies->length (); ++i) + for (CORBA::ULong i = 0; i != policies.size (); ++i) { policies[i]->destroy (); } @@ -122,7 +122,7 @@ TAO_ECG_Reactive_ConsumerEC_Control::activate (void) CORBA::Any any; any <<= timeout; - this->policy_list_.length (1); + this->policy_list_.resize (1); this->policy_list_[0] = this->orb_->create_policy ( Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE, diff --git a/orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp b/orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp index 9358fbc65af..22d83c7e30d 100644 --- a/orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp +++ b/orbsvcs/orbsvcs/Event/ECG_Reconnect_ConsumerEC_Control.cpp @@ -121,7 +121,7 @@ TAO_ECG_Reconnect_ConsumerEC_Control::handle_timeout ( // Query the state of the Current object *before* we initiate // the iteration... CORBA::PolicyTypeSeq types; - CORBA::PolicyList_var policies = + CORBA::PolicyList policies = this->policy_current_->get_policy_overrides (types); // Change the timeout @@ -131,9 +131,9 @@ TAO_ECG_Reconnect_ConsumerEC_Control::handle_timeout ( // Query the state of the consumers... this->query_eventchannel (); - this->policy_current_->set_policy_overrides (policies.in (), + this->policy_current_->set_policy_overrides (policies, CORBA::SET_OVERRIDE); - for (CORBA::ULong i = 0; i != policies->length (); ++i) + for (CORBA::ULong i = 0; i != policies.size (); ++i) { policies[i]->destroy (); } @@ -162,7 +162,7 @@ TAO_ECG_Reconnect_ConsumerEC_Control::activate (void) CORBA::Any any; any <<= timeout; - this->policy_list_.length (1); + this->policy_list_.resize (1); this->policy_list_[0] = this->orb_->create_policy ( Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE, diff --git a/orbsvcs/orbsvcs/Event/ECG_UDP_Receiver.cpp b/orbsvcs/orbsvcs/Event/ECG_UDP_Receiver.cpp index b076949f084..0f2be3c8f2d 100644 --- a/orbsvcs/orbsvcs/Event/ECG_UDP_Receiver.cpp +++ b/orbsvcs/orbsvcs/Event/ECG_UDP_Receiver.cpp @@ -65,7 +65,7 @@ TAO_ECG_UDP_Receiver::connect (const RtecEventChannelAdmin::SupplierQOS& pub) throw CORBA::INTERNAL (); } - if (pub.publications.length () == 0) + if (pub.publications.size () == 0) { ACE_ERROR ((LM_ERROR, "TAO_ECG_UDP_Receiver::connect(): " diff --git a/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.cpp b/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.cpp index 2f0ae9dac8a..178c597907e 100644 --- a/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.cpp +++ b/orbsvcs/orbsvcs/Event/ECG_UDP_Sender.cpp @@ -70,7 +70,7 @@ TAO_ECG_UDP_Sender::connect (const RtecEventChannelAdmin::ConsumerQOS& sub) throw CORBA::INTERNAL (); } - if (sub.dependencies.length () == 0) + if (sub.dependencies.size () == 0) { ACE_ERROR ((LM_ERROR, "TAO_ECG_UDP_Sender::connect(): " "0-length subscriptions argument.")); @@ -165,7 +165,7 @@ TAO_ECG_UDP_Sender::shutdown (void) void TAO_ECG_UDP_Sender::push (const RtecEventComm::EventSet &events) { - if (events.length () == 0) + if (events.size () == 0) { // ACE_DEBUG ((EC_FORMAT (DEBUG, // "Nothing to multicast: " @@ -176,7 +176,7 @@ TAO_ECG_UDP_Sender::push (const RtecEventComm::EventSet &events) // Send each event in a separate message. // @@ TODO It is interesting to group events destined to the // same mcast group in a single message. - for (u_int i = 0; i < events.length (); ++i) + for (u_int i = 0; i < events.size (); ++i) { // To avoid loops we keep a TTL field on the events and skip the // events with TTL <= 0 diff --git a/orbsvcs/orbsvcs/Event/EC_Basic_Filter_Builder.cpp b/orbsvcs/orbsvcs/Event/EC_Basic_Filter_Builder.cpp index fc231d2186d..a7a0074ef56 100644 --- a/orbsvcs/orbsvcs/Event/EC_Basic_Filter_Builder.cpp +++ b/orbsvcs/orbsvcs/Event/EC_Basic_Filter_Builder.cpp @@ -39,7 +39,7 @@ TAO_EC_Basic_Filter_Builder:: recursive_build ( RtecEventChannelAdmin::ConsumerQOS& qos, CORBA::ULong& pos) const { - CORBA::ULong l = qos.dependencies.length (); + CORBA::ULong l = qos.dependencies.size (); if (pos == l) return 0; @@ -98,7 +98,7 @@ TAO_EC_Basic_Filter_Builder:: recursive_build ( { pos++; // COnsumer the designator - if (pos == qos.dependencies.length ()) + if (pos == qos.dependencies.size ()) return 0; CORBA::ULong source_mask = qos.dependencies[pos].event.header.source; CORBA::ULong type_mask = qos.dependencies[pos].event.header.type; @@ -114,13 +114,13 @@ TAO_EC_Basic_Filter_Builder:: recursive_build ( { pos++; // Consume the designator - if (pos == qos.dependencies.length ()) + if (pos == qos.dependencies.size ()) return 0; CORBA::ULong source_mask = qos.dependencies[pos].event.header.source; CORBA::ULong type_mask = qos.dependencies[pos].event.header.type; pos++; - if (pos == qos.dependencies.length ()) + if (pos == qos.dependencies.size ()) return 0; CORBA::ULong source_value = qos.dependencies[pos].event.header.source; CORBA::ULong type_value = qos.dependencies[pos].event.header.type; @@ -158,7 +158,7 @@ TAO_EC_Basic_Filter_Builder:: count_children (RtecEventChannelAdmin::ConsumerQOS& qos, CORBA::ULong pos) const { - CORBA::ULong l = qos.dependencies.length (); + CORBA::ULong l = qos.dependencies.size (); CORBA::ULong i; int count = 0; for (i = pos; i != l; ++i) diff --git a/orbsvcs/orbsvcs/Event/EC_Bitmask_Filter.cpp b/orbsvcs/orbsvcs/Event/EC_Bitmask_Filter.cpp index 607f65f3a48..2395bed2de1 100644 --- a/orbsvcs/orbsvcs/Event/EC_Bitmask_Filter.cpp +++ b/orbsvcs/orbsvcs/Event/EC_Bitmask_Filter.cpp @@ -43,7 +43,7 @@ int TAO_EC_Bitmask_Filter::filter (const RtecEventComm::EventSet& event, TAO_EC_QOS_Info& qos_info) { - if (event.length () != 1) + if (event.size () != 1) return 0; if ((event[0].header.type & this->type_mask_) == 0 @@ -57,7 +57,7 @@ int TAO_EC_Bitmask_Filter::filter_nocopy (RtecEventComm::EventSet& event, TAO_EC_QOS_Info& qos_info) { - if (event.length () != 1) + if (event.size () != 1) return 0; if ((event[0].header.type & this->type_mask_) == 0 diff --git a/orbsvcs/orbsvcs/Event/EC_Conjunction_Filter.cpp b/orbsvcs/orbsvcs/Event/EC_Conjunction_Filter.cpp index ff6f91ecd91..cce53603fd0 100644 --- a/orbsvcs/orbsvcs/Event/EC_Conjunction_Filter.cpp +++ b/orbsvcs/orbsvcs/Event/EC_Conjunction_Filter.cpp @@ -120,9 +120,9 @@ TAO_EC_Conjunction_Filter::push (const RtecEventComm::EventSet& event, if (ACE_BIT_ENABLED (this->bitvec_[w], 1<<b)) return; ACE_SET_BITS (this->bitvec_[w], 1<<b); - CORBA::ULong n = event.length (); - CORBA::ULong l = this->event_.length (); - this->event_.length (l + n); + CORBA::ULong n = event.size (); + CORBA::ULong l = this->event_.size (); + this->event_.resize (l + n); for (CORBA::ULong i = 0; i != n; ++i) { this->event_[l + i] = event[i]; @@ -159,7 +159,7 @@ TAO_EC_Conjunction_Filter::clear (void) Word last = ~0 << b; *j = last; - this->event_.length (0); + this->event_.resize (0); } CORBA::ULong diff --git a/orbsvcs/orbsvcs/Event/EC_Default_ProxyConsumer.cpp b/orbsvcs/orbsvcs/Event/EC_Default_ProxyConsumer.cpp index e8a1f41cb43..a46b275b1bc 100644 --- a/orbsvcs/orbsvcs/Event/EC_Default_ProxyConsumer.cpp +++ b/orbsvcs/orbsvcs/Event/EC_Default_ProxyConsumer.cpp @@ -164,9 +164,9 @@ TAO_EC_Default_ProxyPushConsumer::activate ( PortableServer::ObjectId TAO_EC_Default_ProxyPushConsumer::object_id (void) { - PortableServer::ObjectId_var result = + PortableServer::ObjectId result = this->default_POA_->servant_to_id (this); - return result.in (); + return result; } TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/orbsvcs/orbsvcs/Event/EC_Default_ProxySupplier.cpp b/orbsvcs/orbsvcs/Event/EC_Default_ProxySupplier.cpp index 6b97a3226de..0944fa6ca7a 100644 --- a/orbsvcs/orbsvcs/Event/EC_Default_ProxySupplier.cpp +++ b/orbsvcs/orbsvcs/Event/EC_Default_ProxySupplier.cpp @@ -79,7 +79,7 @@ TAO_EC_Default_ProxyPushSupplier::connect_push_consumer ( if ( consumer_validate_connection_ == 1 ) { // Validate connection during connect. - CORBA::PolicyList_var unused; + CORBA::PolicyList unused; int status = push_consumer->_validate_connection (unused); #if TAO_EC_ENABLE_DEBUG_MESSAGES ACE_DEBUG ((LM_DEBUG, "Validated connection to PushConsumer on connect. Status[%d]\n", status)); @@ -191,10 +191,10 @@ TAO_EC_Default_ProxyPushSupplier::activate ( PortableServer::ObjectId TAO_EC_Default_ProxyPushSupplier::object_id (void) { - PortableServer::ObjectId_var result = + PortableServer::ObjectId result = this->default_POA_->servant_to_id (this); - return result.in (); + return result; } TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/orbsvcs/orbsvcs/Event/EC_Dispatching_Task.inl b/orbsvcs/orbsvcs/Event/EC_Dispatching_Task.inl index 37930e408fe..febc6ac7809 100644 --- a/orbsvcs/orbsvcs/Event/EC_Dispatching_Task.inl +++ b/orbsvcs/orbsvcs/Event/EC_Dispatching_Task.inl @@ -83,12 +83,14 @@ TAO_EC_Push_Command::TAO_EC_Push_Command ( // We cannot do this on the initialization because get_buffer() // could get called first, effectively setting maximum() and // length() to 0! - // - CORBA::ULong maximum = event.maximum (); - CORBA::ULong length = event.length (); +/* + CORBA::ULong maximum = event.capacity (); + CORBA::ULong length = event.size (); RtecEventComm::Event* buffer = event.get_buffer (1); event_.replace (maximum, length, buffer, 1); - +*/ + this->event_ = event; + this->proxy_->_incr_refcnt (); } diff --git a/orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.cpp b/orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.cpp index aa68b7259ad..4a04c8d1050 100644 --- a/orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.cpp +++ b/orbsvcs/orbsvcs/Event/EC_Event_Channel_Base.cpp @@ -171,9 +171,9 @@ TAO_EC_Event_Channel_Base::deactivate_supplier_admin (void) { PortableServer::POA_var supplier_poa = this->supplier_admin_->_default_POA (); - PortableServer::ObjectId_var supplier_id = + PortableServer::ObjectId supplier_id = supplier_poa->servant_to_id (this->supplier_admin_); - supplier_poa->deactivate_object (supplier_id.in ()); + supplier_poa->deactivate_object (supplier_id); } catch (const CORBA::Exception&) { @@ -188,9 +188,9 @@ TAO_EC_Event_Channel_Base::deactivate_consumer_admin (void) { PortableServer::POA_var consumer_poa = this->consumer_admin_->_default_POA (); - PortableServer::ObjectId_var consumer_id = + PortableServer::ObjectId consumer_id = consumer_poa->servant_to_id (this->consumer_admin_); - consumer_poa->deactivate_object (consumer_id.in ()); + consumer_poa->deactivate_object (consumer_id); } catch (const CORBA::Exception&) { diff --git a/orbsvcs/orbsvcs/Event/EC_Gateway_IIOP.cpp b/orbsvcs/orbsvcs/Event/EC_Gateway_IIOP.cpp index ee1aec04bd5..d7ce4d4027e 100644 --- a/orbsvcs/orbsvcs/Event/EC_Gateway_IIOP.cpp +++ b/orbsvcs/orbsvcs/Event/EC_Gateway_IIOP.cpp @@ -191,7 +191,7 @@ void TAO_EC_Gateway_IIOP::update_consumer ( const RtecEventChannelAdmin::ConsumerQOS& c_qos) { - if (c_qos.dependencies.length () == 0) + if (c_qos.dependencies.size () == 0) return; ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_); @@ -263,7 +263,7 @@ TAO_EC_Gateway_IIOP::open_i ( // Change the RT_Info in the consumer QoS. // On the same loop we discover the subscriptions by event source, // and fill the consumer proxy map if we have to use this map. - for (CORBA::ULong i = 0; i < sub.dependencies.length (); ++i) + for (CORBA::ULong i = 0; i < sub.dependencies.size (); ++i) { sub.dependencies[i].rt_info = this->supplier_info_; @@ -315,13 +315,13 @@ TAO_EC_Gateway_IIOP::open_i ( ++j) { RtecEventChannelAdmin::SupplierQOS pub; - pub.publications.length (sub.dependencies.length () + 1); + pub.publications.resize (sub.dependencies.size () + 1); pub.is_gateway = true; int c = 0; RtecEventComm::EventSourceID sid = (*j).ext_id_; - for (CORBA::ULong k = 0; k < sub.dependencies.length (); ++k) + for (CORBA::ULong k = 0; k < sub.dependencies.size (); ++k) { const RtecEventComm::EventHeader& h = sub.dependencies[k].event.header; @@ -342,7 +342,7 @@ TAO_EC_Gateway_IIOP::open_i ( if (c == 0) continue; - pub.publications.length (c); + pub.publications.resize (c); // ACE_DEBUG ((LM_DEBUG, "ECG (%P|%t) Gateway/Supplier ")); // ACE_SupplierQOS_Factory::debug (pub); @@ -355,10 +355,10 @@ TAO_EC_Gateway_IIOP::open_i ( // consumer proxy map, and all subscriptions when we don't use the map and // then connect to the default consumer proxy. RtecEventChannelAdmin::SupplierQOS pub; - pub.publications.length (sub.dependencies.length () + 1); + pub.publications.resize (sub.dependencies.size () + 1); pub.is_gateway = true; int c = 0; - for (CORBA::ULong k = 0; k < sub.dependencies.length (); ++k) + for (CORBA::ULong k = 0; k < sub.dependencies.size (); ++k) { const RtecEventComm::EventHeader& h = sub.dependencies[k].event.header; @@ -393,7 +393,7 @@ TAO_EC_Gateway_IIOP::open_i ( this->default_consumer_proxy_ = supplier_admin->obtain_push_consumer (); - pub.publications.length (c); + pub.publications.resize (c); // ACE_DEBUG ((LM_DEBUG, "ECG (%t) Gateway/Supplier ")); // ACE_SupplierQOS_Factory::debug (pub); this->default_consumer_proxy_->connect_push_supplier (supplier_ref.in (), @@ -445,7 +445,7 @@ TAO_EC_Gateway_IIOP::push (const RtecEventComm::EventSet &events) { // ACE_DEBUG ((LM_DEBUG, "TAO_EC_Gateway_IIOP::push (%P|%t) -\n")); - if (events.length () == 0) + if (events.size () == 0) { // ACE_DEBUG ((LM_DEBUG, "no events\n")); return; @@ -462,8 +462,8 @@ TAO_EC_Gateway_IIOP::push (const RtecEventComm::EventSet &events) // @@ TODO, there is an extra data copy here, we should do the event // modification without it and only compact the necessary events. RtecEventComm::EventSet out (1); - out.length (1); - for (CORBA::ULong i = 0; i < events.length (); ++i) + out.resize (1); + for (CORBA::ULong i = 0; i < events.size (); ++i) { if (this->use_ttl_ == 1) { @@ -549,9 +549,9 @@ TAO_EC_Gateway_IIOP::shutdown (void) { PortableServer::POA_var poa = this->supplier_._default_POA (); - PortableServer::ObjectId_var id = + PortableServer::ObjectId id = poa->servant_to_id (&this->supplier_); - poa->deactivate_object (id.in ()); + poa->deactivate_object (id); this->supplier_is_active_ = false; } @@ -559,9 +559,9 @@ TAO_EC_Gateway_IIOP::shutdown (void) { PortableServer::POA_var poa = this->consumer_._default_POA (); - PortableServer::ObjectId_var id = + PortableServer::ObjectId id = poa->servant_to_id (&this->consumer_); - poa->deactivate_object (id.in ()); + poa->deactivate_object (id); this->consumer_is_active_ = false; } diff --git a/orbsvcs/orbsvcs/Event/EC_Lifetime_Utils_T.cpp b/orbsvcs/orbsvcs/Event/EC_Lifetime_Utils_T.cpp index 360f6d11744..0dd00ee375f 100644 --- a/orbsvcs/orbsvcs/Event/EC_Lifetime_Utils_T.cpp +++ b/orbsvcs/orbsvcs/Event/EC_Lifetime_Utils_T.cpp @@ -19,14 +19,14 @@ activate (T & obj_ref, TAO_EC_Object_Deactivator & suggested_object_deactivator) { // Activate the servant into the POA. - PortableServer::ObjectId_var obj_id = + PortableServer::ObjectId obj_id = poa->activate_object (servant); - suggested_object_deactivator.set_values (poa, obj_id.in ()); + suggested_object_deactivator.set_values (poa, obj_id); // Get the object reference of the activated object. CORBA::Object_var obj = - poa->id_to_reference (obj_id.in ()); + poa->id_to_reference (obj_id); // Don't try to use T::_obj_type::_narrow, some compilers don't like it so // do this in two steps diff --git a/orbsvcs/orbsvcs/Event/EC_Masked_Type_Filter.cpp b/orbsvcs/orbsvcs/Event/EC_Masked_Type_Filter.cpp index cff73bd1cd3..d808e1bbac2 100644 --- a/orbsvcs/orbsvcs/Event/EC_Masked_Type_Filter.cpp +++ b/orbsvcs/orbsvcs/Event/EC_Masked_Type_Filter.cpp @@ -44,7 +44,7 @@ int TAO_EC_Masked_Type_Filter::filter (const RtecEventComm::EventSet& event, TAO_EC_QOS_Info& qos_info) { - if (event.length () != 1) + if (event.size () != 1) return 0; if ((event[0].header.type & this->type_mask_) != this->type_value_ @@ -62,7 +62,7 @@ int TAO_EC_Masked_Type_Filter::filter_nocopy (RtecEventComm::EventSet& event, TAO_EC_QOS_Info& qos_info) { - if (event.length () != 1) + if (event.size () != 1) return 0; if ((event[0].header.type & this->type_mask_) != this->type_value_ diff --git a/orbsvcs/orbsvcs/Event/EC_Null_Scheduling.cpp b/orbsvcs/orbsvcs/Event/EC_Null_Scheduling.cpp index cfec105b9a4..dace85bf437 100644 --- a/orbsvcs/orbsvcs/Event/EC_Null_Scheduling.cpp +++ b/orbsvcs/orbsvcs/Event/EC_Null_Scheduling.cpp @@ -22,12 +22,14 @@ TAO_EC_Null_Scheduling::schedule_event (const RtecEventComm::EventSet &event, TAO_EC_ProxyPushConsumer *, TAO_EC_Supplier_Filter *filter) { - for (CORBA::ULong j = 0; j < event.length (); ++j) + for (CORBA::ULong j = 0; j < event.size (); ++j) { const RtecEventComm::Event& e = event[j]; RtecEventComm::Event* buffer = const_cast<RtecEventComm::Event*> (&e); - RtecEventComm::EventSet single_event (1, 1, buffer, 0); + + RtecEventComm::EventSet single_event; + single_event.push_back (*buffer); TAO_EC_QOS_Info event_info; filter->push_scheduled_event (single_event, event_info); diff --git a/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp b/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp index 48d13c2bc31..1330d475a8f 100644 --- a/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp +++ b/orbsvcs/orbsvcs/Event/EC_ObserverStrategy.cpp @@ -229,7 +229,7 @@ TAO_EC_Basic_ObserverStrategy::fill_qos ( RtecEventChannelAdmin::DependencySet& dep = qos.dependencies; - dep.length (static_cast<CORBA::ULong> (headers.current_size () + 1)); + dep.resize (static_cast<CORBA::ULong> (headers.current_size () + 1)); dep[0].event.header.type = ACE_ES_DISJUNCTION_DESIGNATOR; dep[0].event.header.source = static_cast<CORBA::ULong> (headers.current_size ()); @@ -252,7 +252,7 @@ TAO_EC_Basic_ObserverStrategy::fill_qos ( TAO_EC_Accumulate_Consumer_Headers worker (headers); this->event_channel_->for_each_supplier (&worker); - qos.publications.length (static_cast<CORBA::ULong> (headers.current_size ())); + qos.publications.resize (static_cast<CORBA::ULong> (headers.current_size ())); CORBA::ULong count = 0; for (HeadersIterator i = headers.begin (); i != headers.end (); ++i) @@ -398,7 +398,7 @@ TAO_EC_Accumulate_Supplier_Headers::work (TAO_EC_ProxyPushSupplier *supplier) supplier->subscriptions (); if (sub.is_gateway) return; - for (CORBA::ULong j = 0; j < sub.dependencies.length (); ++j) + for (CORBA::ULong j = 0; j < sub.dependencies.size (); ++j) { const RtecEventComm::Event& event = sub.dependencies[j].event; @@ -419,7 +419,7 @@ TAO_EC_Accumulate_Consumer_Headers::work (TAO_EC_ProxyPushConsumer *consumer) consumer->publications (); if (pub.is_gateway) return; - for (CORBA::ULong j = 0; j < pub.publications.length (); ++j) + for (CORBA::ULong j = 0; j < pub.publications.size (); ++j) { const RtecEventComm::Event& event = pub.publications[j].event; diff --git a/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.cpp b/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.cpp index 37f99bf81da..8dcc1ab52a0 100644 --- a/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.cpp +++ b/orbsvcs/orbsvcs/Event/EC_Per_Supplier_Filter.cpp @@ -76,7 +76,7 @@ TAO_EC_Per_Supplier_Filter::connected (TAO_EC_ProxyPushSupplier* supplier) const RtecEventChannelAdmin::SupplierQOS& pub = this->consumer_->publications_i (); - for (CORBA::ULong j = 0; j < pub.publications.length (); ++j) + for (CORBA::ULong j = 0; j < pub.publications.size (); ++j) { const RtecEventComm::Event& event = pub.publications[j].event; @@ -112,7 +112,7 @@ TAO_EC_Per_Supplier_Filter::reconnected (TAO_EC_ProxyPushSupplier* supplier) const RtecEventChannelAdmin::SupplierQOS& pub = this->consumer_->publications_i (); - for (CORBA::ULong j = 0; j < pub.publications.length (); ++j) + for (CORBA::ULong j = 0; j < pub.publications.size (); ++j) { const RtecEventComm::Event& event = pub.publications[j].event; diff --git a/orbsvcs/orbsvcs/Event/EC_Prefix_Filter_Builder.cpp b/orbsvcs/orbsvcs/Event/EC_Prefix_Filter_Builder.cpp index 580c0e4d4d3..3d36e3c9880 100644 --- a/orbsvcs/orbsvcs/Event/EC_Prefix_Filter_Builder.cpp +++ b/orbsvcs/orbsvcs/Event/EC_Prefix_Filter_Builder.cpp @@ -38,7 +38,7 @@ TAO_EC_Prefix_Filter_Builder:: recursive_build ( RtecEventChannelAdmin::ConsumerQOS& qos, CORBA::ULong& pos) const { - CORBA::ULong l = qos.dependencies.length (); + CORBA::ULong l = qos.dependencies.size (); if (pos == l) return 0; @@ -99,7 +99,7 @@ TAO_EC_Prefix_Filter_Builder:: recursive_build ( { pos++; // COnsumer the designator - if (pos == qos.dependencies.length ()) + if (pos == qos.dependencies.size ()) return 0; CORBA::ULong source_mask = qos.dependencies[pos].event.header.source; CORBA::ULong type_mask = qos.dependencies[pos].event.header.type; @@ -115,13 +115,13 @@ TAO_EC_Prefix_Filter_Builder:: recursive_build ( { pos++; // Consume the designator - if (pos == qos.dependencies.length ()) + if (pos == qos.dependencies.size ()) return 0; CORBA::ULong source_mask = qos.dependencies[pos].event.header.source; CORBA::ULong type_mask = qos.dependencies[pos].event.header.type; pos++; - if (pos == qos.dependencies.length ()) + if (pos == qos.dependencies.size ()) return 0; CORBA::ULong source_value = qos.dependencies[pos].event.header.source; CORBA::ULong type_value = qos.dependencies[pos].event.header.type; diff --git a/orbsvcs/orbsvcs/Event/EC_Priority_Scheduling.cpp b/orbsvcs/orbsvcs/Event/EC_Priority_Scheduling.cpp index 7bd17246249..555fd172947 100644 --- a/orbsvcs/orbsvcs/Event/EC_Priority_Scheduling.cpp +++ b/orbsvcs/orbsvcs/Event/EC_Priority_Scheduling.cpp @@ -27,7 +27,7 @@ TAO_EC_Priority_Scheduling::add_proxy_supplier_dependencies ( supplier, consumer)); const RtecEventChannelAdmin::SupplierQOS& qos = consumer->publications (); - for (CORBA::ULong i = 0; i < qos.publications.length (); ++i) + for (CORBA::ULong i = 0; i < qos.publications.size (); ++i) { const RtecEventComm::EventHeader &header = qos.publications[i].event.header; @@ -55,16 +55,18 @@ TAO_EC_Priority_Scheduling::schedule_event (const RtecEventComm::EventSet &event RtecEventChannelAdmin::SupplierQOS qos = consumer->publications (); - for (CORBA::ULong j = 0; j != event.length (); ++j) + for (CORBA::ULong j = 0; j != event.size (); ++j) { const RtecEventComm::Event& e = event[j]; RtecEventComm::Event* buffer = const_cast<RtecEventComm::Event*> (&e); - RtecEventComm::EventSet single_event (1, 1, buffer, 0); + + RtecEventComm::EventSet single_event; + single_event.push_back (*buffer); TAO_EC_QOS_Info qos_info; - for (CORBA::ULong i = 0; i != qos.publications.length (); ++i) + for (CORBA::ULong i = 0; i != qos.publications.size (); ++i) { const RtecEventComm::EventHeader &qos_header = qos.publications[i].event.header; diff --git a/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.cpp b/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.cpp index c72ea526cf8..d828e4818df 100644 --- a/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.cpp +++ b/orbsvcs/orbsvcs/Event/EC_Reactive_ConsumerControl.cpp @@ -66,7 +66,7 @@ TAO_EC_Reactive_ConsumerControl::handle_timeout ( // Query the state of the Current object *before* we initiate // the iteration... CORBA::PolicyTypeSeq types; - CORBA::PolicyList_var policies = + CORBA::PolicyList policies = this->policy_current_->get_policy_overrides (types); // Change the timeout @@ -76,9 +76,9 @@ TAO_EC_Reactive_ConsumerControl::handle_timeout ( // Query the state of the consumers... this->query_consumers (); - this->policy_current_->set_policy_overrides (policies.in (), + this->policy_current_->set_policy_overrides (policies, CORBA::SET_OVERRIDE); - for (CORBA::ULong i = 0; i != policies->length (); ++i) + for (CORBA::ULong i = 0; i != policies.size (); ++i) { policies[i]->destroy (); } @@ -107,7 +107,7 @@ TAO_EC_Reactive_ConsumerControl::activate (void) CORBA::Any any; any <<= timeout; - this->policy_list_.length (1); + this->policy_list_.resize (1); this->policy_list_[0] = this->orb_->create_policy ( Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE, any); diff --git a/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp b/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp index 40e96be4414..e5736124efd 100644 --- a/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp +++ b/orbsvcs/orbsvcs/Event/EC_Reactive_SupplierControl.cpp @@ -58,7 +58,7 @@ TAO_EC_Reactive_SupplierControl::handle_timeout ( // Query the state of the Current object *before* we initiate // the iteration... CORBA::PolicyTypeSeq types; - CORBA::PolicyList_var policies = + CORBA::PolicyList policies = this->policy_current_->get_policy_overrides (types); // Change the timeout @@ -68,9 +68,9 @@ TAO_EC_Reactive_SupplierControl::handle_timeout ( // Query the state of the suppliers... this->query_suppliers (); - this->policy_current_->set_policy_overrides (policies.in (), + this->policy_current_->set_policy_overrides (policies, CORBA::SET_OVERRIDE); - for (CORBA::ULong i = 0; i != policies->length (); ++i) + for (CORBA::ULong i = 0; i != policies.size (); ++i) { policies[i]->destroy (); } @@ -99,7 +99,7 @@ TAO_EC_Reactive_SupplierControl::activate (void) CORBA::Any any; any <<= timeout; - this->policy_list_.length (1); + this->policy_list_.resize (1); this->policy_list_[0] = this->orb_->create_policy ( Messaging::RELATIVE_RT_TIMEOUT_POLICY_TYPE, diff --git a/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.cpp b/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.cpp index 374a0a67cf0..a024c3a449a 100644 --- a/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.cpp +++ b/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.cpp @@ -289,7 +289,7 @@ TAO_EC_Sched_Filter_Builder:: count_children (RtecEventChannelAdmin::ConsumerQOS& qos, CORBA::ULong pos) const { - CORBA::ULong l = qos.dependencies.length (); + CORBA::ULong l = qos.dependencies.size (); CORBA::ULong i; for (i = pos; i != l; ++i) { diff --git a/orbsvcs/orbsvcs/Event/EC_Timeout_Generator.cpp b/orbsvcs/orbsvcs/Event/EC_Timeout_Generator.cpp index 453af4eeaf2..fda4db5e345 100644 --- a/orbsvcs/orbsvcs/Event/EC_Timeout_Generator.cpp +++ b/orbsvcs/orbsvcs/Event/EC_Timeout_Generator.cpp @@ -41,7 +41,8 @@ TAO_EC_Timeout_Adapter::handle_timeout (const ACE_Time_Value & /* tv */, e.header.type = filter->type (); e.header.source = 0; - RtecEventComm::EventSet single_event (1, 1, &e, 0); + RtecEventComm::EventSet single_event; + single_event.push_back (e); TAO_EC_QOS_Info qos_info = filter->qos_info (); filter->push_to_proxy (single_event, diff --git a/orbsvcs/orbsvcs/Event/EC_Type_Filter.cpp b/orbsvcs/orbsvcs/Event/EC_Type_Filter.cpp index f4f99440f0c..6b158f213cf 100644 --- a/orbsvcs/orbsvcs/Event/EC_Type_Filter.cpp +++ b/orbsvcs/orbsvcs/Event/EC_Type_Filter.cpp @@ -15,7 +15,7 @@ int TAO_EC_Type_Filter::filter (const RtecEventComm::EventSet& event, TAO_EC_QOS_Info& qos_info) { - if (event.length () != 1) + if (event.size () != 1) return this->filter_set (event, qos_info); if (this->can_match (event[0].header)) @@ -30,7 +30,7 @@ int TAO_EC_Type_Filter::filter_nocopy (RtecEventComm::EventSet& event, TAO_EC_QOS_Info& qos_info) { - if (event.length () != 1) + if (event.size () != 1) return this->filter_set (event, qos_info); if (this->can_match (event[0].header)) @@ -116,8 +116,8 @@ int TAO_EC_Type_Filter::filter_set (const RtecEventComm::EventSet& event, TAO_EC_QOS_Info& qos_info) { - CORBA::ULong maximum = event.length (); - if (event.maximum () == 0) + CORBA::ULong maximum = event.size (); + if (event.capacity () == 0) return 0; RtecEventComm::EventSet matched (maximum); @@ -126,11 +126,11 @@ TAO_EC_Type_Filter::filter_set (const RtecEventComm::EventSet& event, { if (!this->can_match (event[i].header)) continue; - matched.length (next_slot + 1); + matched.resize (next_slot + 1); matched[next_slot] = event[i]; next_slot++; } - if (matched.length () == 0) + if (matched.size () == 0) return 0; this->push (matched, qos_info); diff --git a/orbsvcs/orbsvcs/RTSched.mpc b/orbsvcs/orbsvcs/RTSched.mpc index 7020e3ce481..12973736031 100644 --- a/orbsvcs/orbsvcs/RTSched.mpc +++ b/orbsvcs/orbsvcs/RTSched.mpc @@ -3,7 +3,9 @@ project(RTSched) : orbsvcslib, orbsvcs_output, install, naming, portableserver, svc_utils, tao_versioning_idl_defaults { sharedname = TAO_RTSched - idlflags += -Wb,export_macro=TAO_RTSched_Export -Wb,export_include=orbsvcs/Sched/sched_export.h + idlflags += -Gstl \ + -Wb,export_macro=TAO_RTSched_Export \ + -Wb,export_include=orbsvcs/Sched/sched_export.h dynamicflags += TAO_RTSCHED_BUILD_DLL tagchecks += Sched diff --git a/orbsvcs/orbsvcs/Runtime_Scheduler.cpp b/orbsvcs/orbsvcs/Runtime_Scheduler.cpp index 8158c18d21c..951b36935ca 100644 --- a/orbsvcs/orbsvcs/Runtime_Scheduler.cpp +++ b/orbsvcs/orbsvcs/Runtime_Scheduler.cpp @@ -29,13 +29,16 @@ ACE_Runtime_Scheduler (int config_count, // it's not present. RtecScheduler::handle_t -ACE_Runtime_Scheduler::create (const char *entry_point) +ACE_Runtime_Scheduler::create (const std::string entry_point) { // Just make sure it's there and return its handle. for (int i = 0; i < entry_count_; ++i) - if (ACE_OS::strcmp (entry_point, - rt_info_[i].entry_point) == 0) - return i + 1; + { + if (entry_point == rt_info_[i].entry_point) + { + return i + 1; + } + } // TODO: throw an exception or print an error. return -1; @@ -45,7 +48,7 @@ ACE_Runtime_Scheduler::create (const char *entry_point) // value if it's not present. RtecScheduler::handle_t -ACE_Runtime_Scheduler::lookup (const char * entry_point) +ACE_Runtime_Scheduler::lookup (const std::string entry_point) { return create (entry_point); } @@ -146,9 +149,9 @@ ACE_Runtime_Scheduler::reset (RtecScheduler::handle_t handle, void -ACE_Runtime_Scheduler::set_seq (const RtecScheduler::RT_Info_Set& infos) +ACE_Runtime_Scheduler::set_seq (const RtecScheduler::RT_Info_Set & infos) { - for (u_int i = 0; i < infos.length (); ++i) + for (u_int i = 0; i < infos.size (); ++i) { // Call the internal set method. this->set (infos[i].handle, @@ -167,7 +170,7 @@ ACE_Runtime_Scheduler::set_seq (const RtecScheduler::RT_Info_Set& infos) void ACE_Runtime_Scheduler::replace_seq (const RtecScheduler::RT_Info_Set& infos) { - for (u_int i = 0; i < infos.length (); ++i) + for (u_int i = 0; i < infos.size (); ++i) { // Call the internal set method. this->set (infos[i].handle, @@ -215,7 +218,7 @@ ACE_Runtime_Scheduler::priority (RtecScheduler::handle_t handle, // based on its entry point name. void -ACE_Runtime_Scheduler::entry_point_priority (const char * entry_point, +ACE_Runtime_Scheduler::entry_point_priority (const std::string entry_point, RtecScheduler::OS_Priority& priority, RtecScheduler::Preemption_Subpriority_t& subpriority, RtecScheduler::Preemption_Priority_t& p_priority) @@ -325,10 +328,10 @@ void ACE_Runtime_Scheduler::set_rt_info_enable_state_seq ( void ACE_Runtime_Scheduler::compute_scheduling (CORBA::Long /* minimum_priority */, CORBA::Long /* maximum_priority */, - RtecScheduler::RT_Info_Set_out /* infos */, - RtecScheduler::Dependency_Set_out /*dependencies */, - RtecScheduler::Config_Info_Set_out /* configs */, - RtecScheduler::Scheduling_Anomaly_Set_out /* anomalies */) + RtecScheduler::RT_Info_Set & /* infos */, + RtecScheduler::Dependency_Set & /*dependencies */, + RtecScheduler::Config_Info_Set & /* configs */, + RtecScheduler::Scheduling_Anomaly_Set & /* anomalies */) { // TODO: Right now just do nothing, later we could validate the // priorities (without recomputing). @@ -341,7 +344,7 @@ ACE_Runtime_Scheduler::compute_scheduling (CORBA::Long /* minimum_priority */, void ACE_Runtime_Scheduler::recompute_scheduling (CORBA::Long minimum_priority, CORBA::Long maximum_priority, - RtecScheduler::Scheduling_Anomaly_Set_out anomalies) + RtecScheduler::Scheduling_Anomaly_Set & anomalies) { // TODO: Right now just do nothing. @@ -357,7 +360,7 @@ ACE_Runtime_Scheduler::recompute_scheduling (CORBA::Long minimum_priority, // of the last schedule re-computation). void -ACE_Runtime_Scheduler::get_rt_info_set (RtecScheduler::RT_Info_Set_out infos) +ACE_Runtime_Scheduler::get_rt_info_set (RtecScheduler::RT_Info_Set & infos) { // TODO: Right now just do nothing. @@ -370,7 +373,7 @@ ACE_Runtime_Scheduler::get_rt_info_set (RtecScheduler::RT_Info_Set_out infos) // of the last schedule re-computation). void -ACE_Runtime_Scheduler::get_dependency_set (RtecScheduler::Dependency_Set_out dependencies) +ACE_Runtime_Scheduler::get_dependency_set (RtecScheduler::Dependency_Set & dependencies) { // TODO: Right now just do nothing. @@ -383,7 +386,7 @@ ACE_Runtime_Scheduler::get_dependency_set (RtecScheduler::Dependency_Set_out dep // number, types, and priority levels for the dispatching lanes. void -ACE_Runtime_Scheduler::get_config_info_set (RtecScheduler::Config_Info_Set_out configs) +ACE_Runtime_Scheduler::get_config_info_set (RtecScheduler::Config_Info_Set & configs) { // TODO: Right now just do nothing. ACE_UNUSED_ARG(configs); @@ -438,7 +441,7 @@ ACE_Runtime_Scheduler::last_scheduled_priority (void) void -ACE_Runtime_Scheduler::get_config_infos (RtecScheduler::Config_Info_Set_out /*configs */) +ACE_Runtime_Scheduler::get_config_infos (RtecScheduler::Config_Info_Set & /*configs */) { // throw an exception if a valid schedule has not been loaded if (this->config_count_ <= 0) diff --git a/orbsvcs/orbsvcs/Runtime_Scheduler.h b/orbsvcs/orbsvcs/Runtime_Scheduler.h index f380b06f0e3..5c7490854d8 100644 --- a/orbsvcs/orbsvcs/Runtime_Scheduler.h +++ b/orbsvcs/orbsvcs/Runtime_Scheduler.h @@ -45,11 +45,11 @@ public: * a new RT_Info. Here, we just return its handle, or an error value if * it's not present. */ - virtual RtecScheduler::handle_t create (const char * entry_point); + virtual RtecScheduler::handle_t create (const std::string entry_point); /// Lookup a handle for an RT_Info, and return its handle, or an error /// value if it's not present. - virtual RtecScheduler::handle_t lookup (const char * entry_point); + virtual RtecScheduler::handle_t lookup (const std::string entry_point); /// Return a pointer to the RT_Info corresponding to the passed handle. virtual RtecScheduler::RT_Info* get (RtecScheduler::handle_t handle); @@ -99,7 +99,7 @@ public: /// Returns the priority and subpriority values assigned to an RT_Info, /// based on its entry point name. - virtual void entry_point_priority (const char * entry_point, + virtual void entry_point_priority (const std::string entry_point, RtecScheduler::OS_Priority& o_priority, RtecScheduler::Preemption_Subpriority_t& p_subpriority, RtecScheduler::Preemption_Priority_t& p_priority); @@ -144,27 +144,27 @@ public: */ virtual void compute_scheduling (CORBA::Long minimum_priority, CORBA::Long maximum_priority, - RtecScheduler::RT_Info_Set_out infos, - RtecScheduler::Dependency_Set_out deps, - RtecScheduler::Config_Info_Set_out configs, - RtecScheduler::Scheduling_Anomaly_Set_out anomalies); + RtecScheduler::RT_Info_Set & infos, + RtecScheduler::Dependency_Set & dependencies, + RtecScheduler::Config_Info_Set & configs, + RtecScheduler::Scheduling_Anomaly_Set & anomalies); /// Recomputes the scheduling priorities, etc. virtual void recompute_scheduling (CORBA::Long minimum_priority, CORBA::Long maximum_priority, - RtecScheduler::Scheduling_Anomaly_Set_out anomalies); + RtecScheduler::Scheduling_Anomaly_Set & anomalies); /// Returns the set of rt_infos, with their assigned priorities (as /// of the last schedule re-computation). - virtual void get_rt_info_set (RtecScheduler::RT_Info_Set_out infos); + virtual void get_rt_info_set (RtecScheduler::RT_Info_Set & infos); /// Returns the set of rt_infos, with their assigned priorities (as /// of the last schedule re-computation). - virtual void get_dependency_set (RtecScheduler::Dependency_Set_out dependencies); + virtual void get_dependency_set (RtecScheduler::Dependency_Set & dependencies); /// Returns the set of config_infos, describing the appropriate /// number, types, and priority levels for the dispatching lanes. - virtual void get_config_info_set (RtecScheduler::Config_Info_Set_out configs); + virtual void get_config_info_set (RtecScheduler::Config_Info_Set & configs); /// Provides the thread priority and queue type for the given priority level. virtual void dispatch_configuration (RtecScheduler::Preemption_Priority_t p_priority, @@ -179,7 +179,7 @@ public: */ virtual RtecScheduler::Preemption_Priority_t last_scheduled_priority (void); - virtual void get_config_infos (RtecScheduler::Config_Info_Set_out configs); + virtual void get_config_infos (RtecScheduler::Config_Info_Set & configs); private: /// The number of elements in the config array. diff --git a/orbsvcs/orbsvcs/Sched/Config_Scheduler.cpp b/orbsvcs/orbsvcs/Sched/Config_Scheduler.cpp index 7ec5e1de1a1..7e25bf24d96 100644 --- a/orbsvcs/orbsvcs/Sched/Config_Scheduler.cpp +++ b/orbsvcs/orbsvcs/Sched/Config_Scheduler.cpp @@ -30,7 +30,7 @@ ACE_Config_Scheduler::~ACE_Config_Scheduler (void) } RtecScheduler::handle_t -ACE_Config_Scheduler::create (const char * entry_point) +ACE_Config_Scheduler::create (const std::string entry_point) { typedef RtecScheduler::RT_Info* RT_Info_ptr; @@ -39,7 +39,7 @@ ACE_Config_Scheduler::create (const char * entry_point) ACE_NEW_RETURN (rt_info[0], RtecScheduler::RT_Info, -1); - rt_info[0]->entry_point = CORBA::string_dup(entry_point); + rt_info[0]->entry_point = CORBA::string_dup(entry_point.c_str ()); rt_info[0]->handle = -1; rt_info[0]->worst_case_execution_time = ORBSVCS_Time::zero (); rt_info[0]->typical_execution_time = ORBSVCS_Time::zero (); @@ -79,10 +79,10 @@ ACE_Config_Scheduler::create (const char * entry_point) } RtecScheduler::handle_t -ACE_Config_Scheduler::lookup (const char * entry_point) +ACE_Config_Scheduler::lookup (const std::string entry_point) { RtecScheduler::RT_Info* rt_info = 0; - switch (impl->get_rt_info (entry_point, rt_info)) + switch (impl->get_rt_info (entry_point.c_str (), rt_info)) { case BaseSchedImplType::SUCCEEDED: return rt_info->handle; @@ -172,7 +172,7 @@ void ACE_Config_Scheduler::priority (RtecScheduler::handle_t handle, } } -void ACE_Config_Scheduler::entry_point_priority (const char * entry_point, +void ACE_Config_Scheduler::entry_point_priority (const std::string entry_point, RtecScheduler::OS_Priority& priority, RtecScheduler::Preemption_Subpriority_t& p_subpriority, RtecScheduler::Preemption_Priority_t& p_priority) @@ -217,10 +217,10 @@ void ACE_Config_Scheduler::add_dependency (RtecScheduler::handle_t handle, void ACE_Config_Scheduler::compute_scheduling (CORBA::Long minimum_priority, CORBA::Long maximum_priority, - RtecScheduler::RT_Info_Set_out infos, - RtecScheduler::Dependency_Set_out dependencies, - RtecScheduler::Config_Info_Set_out configs, - RtecScheduler::Scheduling_Anomaly_Set_out anomalies) + RtecScheduler::RT_Info_Set & infos, + RtecScheduler::Dependency_Set & dependencies, + RtecScheduler::Config_Info_Set & configs, + RtecScheduler::Scheduling_Anomaly_Set & anomalies) { // Initialize the scheduler implementation. @@ -232,12 +232,12 @@ void ACE_Config_Scheduler::compute_scheduling (CORBA::Long minimum_priority, // Invoke the imlementation's scheduling method. BaseSchedImplType::status_t schedule_status; schedule_status = impl->schedule (anomaly_set); - +/* if (dependencies.ptr () == 0) { dependencies = new RtecScheduler::Dependency_Set (); } - +*/ // Iterate over the set of anomalies, reporting each one, storing // it in the set of anomalies to return, and determining the worst // anomaly severity. @@ -247,12 +247,15 @@ void ACE_Config_Scheduler::compute_scheduling (CORBA::Long minimum_priority, CORBA::ULong anomaly_index = 0; CORBA::ULong anomaly_set_size = static_cast<CORBA::ULong> (anomaly_set.size ()); +/* if (anomalies.ptr () == 0) { anomalies = new RtecScheduler::Scheduling_Anomaly_Set (anomaly_set_size); } - anomalies->length (anomaly_set_size); +*/ + + anomalies.resize (anomaly_set_size); ACE_Unbounded_Set_Iterator<RtecScheduler::Scheduling_Anomaly *> anomaly_iter (anomaly_set); for (anomaly_iter.first (), anomaly_index = 0; @@ -355,13 +358,15 @@ void ACE_Config_Scheduler::compute_scheduling (CORBA::Long minimum_priority, } break; } - +/* // return the set of scheduled RT_Infos if (infos.ptr () == 0) { infos = new RtecScheduler::RT_Info_Set (impl->tasks ()); } - infos->length (impl->tasks ()); +*/ + + infos.resize (impl->tasks ()); for (RtecScheduler::handle_t handle = 1; handle <= static_cast<RtecScheduler::handle_t> (impl->tasks ()); ++handle) @@ -382,14 +387,16 @@ void ACE_Config_Scheduler::compute_scheduling (CORBA::Long minimum_priority, break; } } - +/* // return the set of scheduled Config_Infos if (configs.ptr () == 0) { configs = new RtecScheduler::Config_Info_Set(impl->minimum_priority_queue () + 1); } - configs->length (impl->minimum_priority_queue () + 1); +*/ + + configs.resize (impl->minimum_priority_queue () + 1); for (RtecScheduler::Preemption_Priority_t priority = 0; priority <= static_cast<RtecScheduler::Preemption_Priority_t> (impl->minimum_priority_queue ()); @@ -415,10 +422,11 @@ void ACE_Config_Scheduler::compute_scheduling (CORBA::Long minimum_priority, ACE_DEBUG ((LM_DEBUG, "Schedule prepared.\n")); ACE_DEBUG ((LM_DEBUG, "Dumping to stdout.\n")); - ACE_Scheduler_Factory::dump_schedule (*(infos.ptr()), - *(dependencies.ptr()), - *(configs.ptr()), - *(anomalies.ptr()), 0); + ACE_Scheduler_Factory::dump_schedule (infos, + dependencies, + configs, + anomalies, + 0); ACE_DEBUG ((LM_DEBUG, "Dump done.\n")); } @@ -459,7 +467,7 @@ ACE_Config_Scheduler::last_scheduled_priority (void) // All scheduled priorities range from 0 to the number returned, inclusive. void -ACE_Config_Scheduler::get_config_infos (RtecScheduler::Config_Info_Set_out configs) +ACE_Config_Scheduler::get_config_infos (RtecScheduler::Config_Info_Set & configs) { ACE_UNUSED_ARG ((configs)); @@ -546,27 +554,27 @@ void ACE_Config_Scheduler::set_rt_info_enable_state_seq ( void ACE_Config_Scheduler::recompute_scheduling (CORBA::Long, CORBA::Long, - RtecScheduler::Scheduling_Anomaly_Set_out) + RtecScheduler::Scheduling_Anomaly_Set &) // Recomputes the scheduling priorities, etc. { throw CORBA::NO_IMPLEMENT (); } -void ACE_Config_Scheduler::get_rt_info_set (RtecScheduler::RT_Info_Set_out) +void ACE_Config_Scheduler::get_rt_info_set (RtecScheduler::RT_Info_Set &) // Returns the set of rt_infos, with their assigned priorities (as // of the last schedule re-computation). { throw CORBA::NO_IMPLEMENT (); } -void ACE_Config_Scheduler::get_dependency_set (RtecScheduler::Dependency_Set_out) +void ACE_Config_Scheduler::get_dependency_set (RtecScheduler::Dependency_Set &) // Returns the set of rt_infos, with their assigned priorities (as // of the last schedule re-computation). { throw CORBA::NO_IMPLEMENT (); } -void ACE_Config_Scheduler::get_config_info_set (RtecScheduler::Config_Info_Set_out) +void ACE_Config_Scheduler::get_config_info_set (RtecScheduler::Config_Info_Set &) // Returns the set of config_infos, describing the appropriate // number, types, and priority levels for the dispatching lanes. { diff --git a/orbsvcs/orbsvcs/Sched/Config_Scheduler.h b/orbsvcs/orbsvcs/Sched/Config_Scheduler.h index 32456a27e09..66a55ef519e 100644 --- a/orbsvcs/orbsvcs/Sched/Config_Scheduler.h +++ b/orbsvcs/orbsvcs/Sched/Config_Scheduler.h @@ -41,9 +41,9 @@ public: ACE_Config_Scheduler (void); virtual ~ACE_Config_Scheduler (void); - virtual RtecScheduler::handle_t create (const char * entry_point); + virtual RtecScheduler::handle_t create (const std::string entry_point); - virtual RtecScheduler::handle_t lookup (const char * entry_point); + virtual RtecScheduler::handle_t lookup (const std::string entry_point); virtual RtecScheduler::RT_Info* get (RtecScheduler::handle_t handle); @@ -63,7 +63,7 @@ public: RtecScheduler::Preemption_Subpriority_t& p_subpriority, RtecScheduler::Preemption_Priority_t& p_priority); - virtual void entry_point_priority (const char * entry_point, + virtual void entry_point_priority (const std::string entry_point, RtecScheduler::OS_Priority& priority, RtecScheduler::Preemption_Subpriority_t& p_subpriority, RtecScheduler::Preemption_Priority_t& p_priority); @@ -75,10 +75,10 @@ public: virtual void compute_scheduling (CORBA::Long minimum_priority, CORBA::Long maximum_priority, - RtecScheduler::RT_Info_Set_out infos, - RtecScheduler::Dependency_Set_out dependencies, - RtecScheduler::Config_Info_Set_out configs, - RtecScheduler::Scheduling_Anomaly_Set_out anomalies); + RtecScheduler::RT_Info_Set & infos, + RtecScheduler::Dependency_Set & dependencies, + RtecScheduler::Config_Info_Set & configs, + RtecScheduler::Scheduling_Anomaly_Set & anomalies); virtual void dispatch_configuration (RtecScheduler::Preemption_Priority_t p_priority, RtecScheduler::OS_Priority& priority, @@ -94,7 +94,7 @@ public: // All scheduled priorities range from 0 to the number returned, // inclusive. - virtual void get_config_infos (RtecScheduler::Config_Info_Set_out configs); + virtual void get_config_infos (RtecScheduler::Config_Info_Set & configs); // Provides the set of Config_Infos associated with the current schedule. virtual void reset (RtecScheduler::handle_t handle, @@ -148,18 +148,18 @@ public: virtual void recompute_scheduling (CORBA::Long minimum_priority, CORBA::Long maximum_priority, - RtecScheduler::Scheduling_Anomaly_Set_out anomalies); + RtecScheduler::Scheduling_Anomaly_Set & anomalies); // Recomputes the scheduling priorities, etc. - virtual void get_rt_info_set (RtecScheduler::RT_Info_Set_out infos); + virtual void get_rt_info_set (RtecScheduler::RT_Info_Set & infos); // Returns the set of rt_infos, with their assigned priorities (as // of the last schedule re-computation). - virtual void get_dependency_set (RtecScheduler::Dependency_Set_out dependencies); + virtual void get_dependency_set (RtecScheduler::Dependency_Set & dependencies); // Returns the set of rt_infos, with their assigned priorities (as // of the last schedule re-computation). - virtual void get_config_info_set (RtecScheduler::Config_Info_Set_out configs); + virtual void get_config_info_set (RtecScheduler::Config_Info_Set & configs); // Returns the set of config_infos, describing the appropriate // number, types, and priority levels for the dispatching lanes. diff --git a/orbsvcs/orbsvcs/Sched/DynSched.cpp b/orbsvcs/orbsvcs/Sched/DynSched.cpp index 6424d1b5c05..14727adb81d 100644 --- a/orbsvcs/orbsvcs/Sched/DynSched.cpp +++ b/orbsvcs/orbsvcs/Sched/DynSched.cpp @@ -408,12 +408,12 @@ int ACE_DynScheduler::priority ( int ACE_DynScheduler::number_of_dependencies(RT_Info* rt_info) { - return rt_info->dependencies.length(); + return rt_info->dependencies.size(); } int ACE_DynScheduler::number_of_dependencies(RT_Info& rt_info) { - return rt_info.dependencies.length(); + return rt_info.dependencies.size(); } int ACE_DynScheduler::add_dependency(RT_Info* rt_info, @@ -456,8 +456,8 @@ int ACE_DynScheduler::add_dependency(RT_Info* rt_info, temp_info->entry_point.in ())); RtecScheduler::Dependency_Set& set = temp_info->dependencies; - int l = set.length(); - set.length(l + 1); + int l = set.size(); + set.resize(l + 1); set[l] = d; return 0; } diff --git a/orbsvcs/orbsvcs/Sched/Reconfig_Sched_Utils_T.cpp b/orbsvcs/orbsvcs/Sched/Reconfig_Sched_Utils_T.cpp index 467b0e13f8a..e86fd8924c1 100644 --- a/orbsvcs/orbsvcs/Sched/Reconfig_Sched_Utils_T.cpp +++ b/orbsvcs/orbsvcs/Sched/Reconfig_Sched_Utils_T.cpp @@ -88,7 +88,7 @@ visit (TAO_Reconfig_Scheduler_Entry &rse) // Iterate over the set of dependencies for the current entry. TAO_Reconfig_Scheduler_Entry * next_rse = 0; TAO_RT_Info_Ex *next_rt_info = 0; - for (u_int i = 0; i < dependency_set->length (); ++i) + for (u_int i = 0; i < dependency_set->size (); ++i) { // Skip over disabled dependencies if ((*dependency_set) [i].enabled == RtecBase::DEPENDENCY_DISABLED) diff --git a/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.cpp b/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.cpp index e63938825fa..bfbe69ae5c6 100644 --- a/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.cpp +++ b/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.cpp @@ -423,7 +423,7 @@ TAO_Reconfig_Scheduler<RECONFIG_SCHED_STRATEGY, ACE_LOCK>::close (void) template <class RECONFIG_SCHED_STRATEGY, class ACE_LOCK> RtecScheduler::handle_t TAO_Reconfig_Scheduler<RECONFIG_SCHED_STRATEGY, ACE_LOCK>:: -create (const char *entry_point) +create (const std::string entry_point) { #if defined (SCHEDULER_LOGGING) ACE_DEBUG ((LM_TRACE, @@ -434,7 +434,7 @@ create (const char *entry_point) RtecScheduler::SYNCHRONIZATION_FAILURE ()); RtecScheduler::handle_t handle = next_handle_; - create_i (entry_point, handle, 0); + create_i (entry_point.c_str (), handle, 0); // Set affected stability flags. this->stability_flags_ |= @@ -450,7 +450,7 @@ create (const char *entry_point) template <class RECONFIG_SCHED_STRATEGY, class ACE_LOCK> RtecScheduler::handle_t TAO_Reconfig_Scheduler<RECONFIG_SCHED_STRATEGY, ACE_LOCK>:: -lookup (const char * entry_point) +lookup (const std::string entry_point) { #if defined (SCHEDULER_LOGGING) ACE_DEBUG ((LM_TRACE, @@ -461,7 +461,7 @@ lookup (const char * entry_point) RtecScheduler::SYNCHRONIZATION_FAILURE ()); RtecScheduler::handle_t handle; - handle = this->lookup_i (entry_point); + handle = this->lookup_i (entry_point.c_str ()); return handle; } @@ -640,7 +640,7 @@ set_seq (const RtecScheduler::RT_Info_Set& infos) ACE_GUARD_THROW_EX (ACE_LOCK, ace_mon, this->mutex_, RtecScheduler::SYNCHRONIZATION_FAILURE ()); - for (u_int i = 0; i < infos.length (); ++i) + for (u_int i = 0; i < infos.size (); ++i) { // Look up the RT_Info by its handle, throw an exception if it's not there. TAO_RT_Info_Ex *rt_info_ptr = 0; @@ -699,7 +699,7 @@ reset_seq (const RtecScheduler::RT_Info_Set& infos) TAO_RT_Info_Ex *rt_info_ptr = 0; u_int i; - for (i = 0; i < infos.length (); ++i) + for (i = 0; i < infos.size (); ++i) { // Look up the RT_Info by its handle, throw an exception if it's not there. if (rt_info_map_.find (infos[i].handle, rt_info_ptr) != 0) @@ -725,7 +725,7 @@ reset_seq (const RtecScheduler::RT_Info_Set& infos) // Refresh the internal tuple pointer array. this->refresh_tuple_ptr_array_i (); - for (i = 0; i < infos.length (); ++i) + for (i = 0; i < infos.size (); ++i) { // Look up the RT_Info by its handle, throw an exception if it's not there. if (rt_info_map_.find (infos[i].handle, rt_info_ptr) != 0) @@ -813,7 +813,7 @@ replace_seq (const RtecScheduler::RT_Info_Set& infos) * this->tuple_ptr_array_size_); this->rt_info_tuple_count_ = 0; - for (u_int i = 0; i < infos.length (); ++i) + for (u_int i = 0; i < infos.size (); ++i) { // Look up the RT_Info by its handle, throw an exception if it's not there. if (rt_info_map_.find (infos[i].handle, rt_info_ptr) != 0) @@ -899,7 +899,7 @@ priority (RtecScheduler::handle_t handle, template <class RECONFIG_SCHED_STRATEGY, class ACE_LOCK> void TAO_Reconfig_Scheduler<RECONFIG_SCHED_STRATEGY, ACE_LOCK>:: -entry_point_priority (const char * entry_point, +entry_point_priority (const std::string entry_point, RtecScheduler::OS_Priority& priority, RtecScheduler::Preemption_Subpriority_t& subpriority, RtecScheduler::Preemption_Priority_t& p_priority) @@ -913,7 +913,7 @@ entry_point_priority (const char * entry_point, RtecScheduler::SYNCHRONIZATION_FAILURE ()); RtecScheduler::handle_t handle = - this->lookup_i (entry_point); + this->lookup_i (entry_point.c_str ()); this->priority_i (handle, priority, @@ -1020,7 +1020,7 @@ set_dependency_enable_state_seq (const RtecScheduler::Dependency_Set & dependenc RtecScheduler::SYNCHRONIZATION_FAILURE ()); // Delegate to the internal method for each dependency in the sequence. - for (u_int i = 0; i < dependencies.length (); ++i) + for (u_int i = 0; i < dependencies.size (); ++i) { set_dependency_enable_state_i (dependencies[i].rt_info, dependencies[i].rt_info_depended_on, @@ -1079,7 +1079,7 @@ set_rt_info_enable_state_seq (const RtecScheduler::RT_Info_Enable_State_Pair_Set ACE_GUARD_THROW_EX (ACE_LOCK, ace_mon, this->mutex_, RtecScheduler::SYNCHRONIZATION_FAILURE ()); - for (u_int i = 0; i < pair_set.length (); ++i) + for (u_int i = 0; i < pair_set.size (); ++i) { // Look up the RT_Info by its handle, throw an exception if it's not there. TAO_RT_Info_Ex *rt_info_ptr = 0; @@ -1109,10 +1109,10 @@ void TAO_Reconfig_Scheduler<RECONFIG_SCHED_STRATEGY, ACE_LOCK>:: compute_scheduling (CORBA::Long minimum_priority, CORBA::Long maximum_priority, - RtecScheduler::RT_Info_Set_out infos, - RtecScheduler::Dependency_Set_out dependencies, - RtecScheduler::Config_Info_Set_out configs, - RtecScheduler::Scheduling_Anomaly_Set_out anomalies) + RtecScheduler::RT_Info_Set & infos, + RtecScheduler::Dependency_Set & dependencies, + RtecScheduler::Config_Info_Set & configs, + RtecScheduler::Scheduling_Anomaly_Set & anomalies) { // Delegates to recompute_scheduling and the respective accessors. this->recompute_scheduling (minimum_priority, maximum_priority, @@ -1142,7 +1142,7 @@ void TAO_Reconfig_Scheduler<RECONFIG_SCHED_STRATEGY, ACE_LOCK>:: recompute_scheduling (CORBA::Long /* minimum_priority */, CORBA::Long /* maximum_priority */, - RtecScheduler::Scheduling_Anomaly_Set_out anomalies) + RtecScheduler::Scheduling_Anomaly_Set & anomalies) { #if defined (SCHEDULER_LOGGING) ACE_DEBUG ((LM_TRACE, @@ -1159,11 +1159,12 @@ recompute_scheduling (CORBA::Long /* minimum_priority */, // If everything is already up to date, we're done. if (SCHED_ALL_STABLE == stability_flags_) { - +/* // Must always provide a value for an out parameter ACE_NEW_THROW_EX (anomalies, RtecScheduler::Scheduling_Anomaly_Set (0), CORBA::NO_MEMORY ()); +*/ return; } @@ -1258,7 +1259,7 @@ recompute_scheduling (CORBA::Long /* minimum_priority */, #endif } - +/* // @@ TODO: record any scheduling anomalies in a set within the scheduler, // storing the maximum severity level recorded so far. if (anomalies.ptr () == 0) @@ -1267,7 +1268,7 @@ recompute_scheduling (CORBA::Long /* minimum_priority */, RtecScheduler::Scheduling_Anomaly_Set (0), CORBA::NO_MEMORY ()); } - +*/ ACE_DEBUG ((LM_DEBUG, "cutil = %f, ncutil = %f\n", this->critical_utilization_, @@ -1276,8 +1277,8 @@ recompute_scheduling (CORBA::Long /* minimum_priority */, if (this->critical_utilization_ > critical_utilization_threshold_ || this->noncritical_utilization_ > noncritical_utilization_threshold_) { - CORBA::ULong len = anomalies->length (); - anomalies->length (len + 1); + CORBA::ULong len = anomalies.size (); + anomalies.resize (len + 1); anomalies[len].description = CORBA::string_dup("Utilization Bound exceeded"); anomalies[len].severity = RtecScheduler::ANOMALY_ERROR; } @@ -1294,19 +1295,20 @@ recompute_scheduling (CORBA::Long /* minimum_priority */, template <class RECONFIG_SCHED_STRATEGY, class ACE_LOCK> void TAO_Reconfig_Scheduler<RECONFIG_SCHED_STRATEGY, ACE_LOCK>:: -get_rt_info_set (RtecScheduler::RT_Info_Set_out infos) +get_rt_info_set (RtecScheduler::RT_Info_Set & infos) { // return the set of scheduled RT_Infos - +/* if (infos.ptr () == 0) { ACE_NEW_THROW_EX (infos, RtecScheduler::RT_Info_Set (this->rt_info_count_), CORBA::NO_MEMORY ()); } - - infos->length (this->rt_info_count_); +*/ + infos.resize (this->rt_info_count_); TAO_RT_Info_Ex* rt_info = 0; + for (typename RT_INFO_MAP::iterator info_iter (this->rt_info_map_); info_iter.done () == 0; ++info_iter) @@ -1326,15 +1328,17 @@ get_rt_info_set (RtecScheduler::RT_Info_Set_out infos) template <class RECONFIG_SCHED_STRATEGY, class ACE_LOCK> void TAO_Reconfig_Scheduler<RECONFIG_SCHED_STRATEGY, ACE_LOCK>:: -get_dependency_set (RtecScheduler::Dependency_Set_out dependencies) +get_dependency_set (RtecScheduler::Dependency_Set & dependencies) { // Return the set of dependencies: just need to iterate over one of the maps. - +/* if (dependencies.ptr () == 0) { dependencies = new RtecScheduler::Dependency_Set (this->dependency_count_); } - dependencies->length (this->dependency_count_); +*/ + + dependencies.resize (this->dependency_count_); RtecScheduler::Dependency_Set *dependency_set = 0; int i = 0; for (typename DEPENDENCY_SET_MAP::iterator @@ -1344,15 +1348,15 @@ get_dependency_set (RtecScheduler::Dependency_Set_out dependencies) { dependency_set = (*dependency_iter).int_id_; for (u_int j = 0; - j < dependency_set->length () && i < this->dependency_count_; + j < dependency_set->size () && i < this->dependency_count_; ++i, ++j) { - (* dependencies) [i] = (*dependency_set) [j]; + dependencies[i] = (*dependency_set) [j]; // For two-way calls, swap the handles (stored in reverse order in the called map) - if ((* dependencies) [i].dependency_type == RtecBase::TWO_WAY_CALL) + if (dependencies[i].dependency_type == RtecBase::TWO_WAY_CALL) { - (* dependencies) [i].rt_info = (* dependency_set) [j].rt_info_depended_on; - (* dependencies) [i].rt_info_depended_on = (* dependency_set) [j].rt_info; + dependencies[i].rt_info = (* dependency_set) [j].rt_info_depended_on; + dependencies[i].rt_info_depended_on = (* dependency_set) [j].rt_info; } } } @@ -1367,10 +1371,10 @@ get_dependency_set (RtecScheduler::Dependency_Set_out dependencies) template <class RECONFIG_SCHED_STRATEGY, class ACE_LOCK> void TAO_Reconfig_Scheduler<RECONFIG_SCHED_STRATEGY, ACE_LOCK>:: -get_config_info_set (RtecScheduler::Config_Info_Set_out configs) +get_config_info_set (RtecScheduler::Config_Info_Set & configs) { // Return the set of scheduled Config_Infos. - +/* if (configs.ptr () == 0) { ACE_NEW_THROW_EX (configs, @@ -1378,8 +1382,8 @@ get_config_info_set (RtecScheduler::Config_Info_Set_out configs) config_info_count_), CORBA::NO_MEMORY ()); } - - configs->length (this->config_info_count_); +*/ + configs.resize (this->config_info_count_); RtecScheduler::Config_Info* config_info = 0; for (typename CONFIG_INFO_MAP::iterator config_iter (this->config_info_map_); config_iter.done () == 0; @@ -1462,7 +1466,7 @@ last_scheduled_priority (void) template <class RECONFIG_SCHED_STRATEGY, class ACE_LOCK> void TAO_Reconfig_Scheduler<RECONFIG_SCHED_STRATEGY, ACE_LOCK>:: -get_config_infos (RtecScheduler::Config_Info_Set_out configs) +get_config_infos (RtecScheduler::Config_Info_Set & configs) { ACE_GUARD_THROW_EX (ACE_LOCK, ace_mon, this->mutex_, RtecScheduler::SYNCHRONIZATION_FAILURE ()); @@ -1473,7 +1477,7 @@ get_config_infos (RtecScheduler::Config_Info_Set_out configs) { throw RtecScheduler::NOT_SCHEDULED (); } - +/* // return the set of Config_Infos if (configs.ptr () == 0) { @@ -1481,7 +1485,9 @@ get_config_infos (RtecScheduler::Config_Info_Set_out configs) RtecScheduler::Config_Info_Set(this->config_info_count_), CORBA::NO_MEMORY ()); } - configs->length (this->config_info_count_); +*/ + + configs.resize (this->config_info_count_); RtecScheduler::Config_Info* config_info = 0; for (typename CONFIG_INFO_MAP::iterator config_iter (this->config_info_map_); config_iter.done () == 0; @@ -2041,8 +2047,8 @@ map_dependency_i (RtecScheduler::handle_t key, // Insert unconditionally: there can be multiple copies // of the same dependency, if the user so chooses. - int prev_length = dependency_set->length (); - dependency_set->length (prev_length + 1); + int prev_length = dependency_set->size (); + dependency_set->resize (prev_length + 1); (*dependency_set) [prev_length].rt_info = handle; (*dependency_set) [prev_length].rt_info_depended_on = key; // may actually be the other way around (*dependency_set) [prev_length].number_of_calls = number_of_calls; @@ -2074,7 +2080,7 @@ unmap_dependency_i (RtecScheduler::handle_t key, { if (dependency_set) { - int prev_length = dependency_set->length (); + int prev_length = dependency_set->size (); int found = 0; for (int i = 0; i < prev_length; ++i) { @@ -2092,7 +2098,7 @@ unmap_dependency_i (RtecScheduler::handle_t key, (*dependency_set) [j - 1].dependency_type = (*dependency_set) [j].dependency_type; (*dependency_set) [j - 1].enabled = (*dependency_set) [j].enabled; } - dependency_set->length (prev_length - 1); + dependency_set->resize (prev_length - 1); break; } } @@ -2140,7 +2146,7 @@ map_dependency_enable_state_i (RtecScheduler::handle_t key, { if (dependency_set) { - int set_length = dependency_set->length (); + int set_length = dependency_set->size (); int found = 0; for (int i = 0; i < set_length; ++i) { diff --git a/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.h b/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.h index 48b5062c2fd..0df5caf52e4 100644 --- a/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.h +++ b/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.h @@ -116,11 +116,11 @@ public: * RT_Info is returned. If the RT_Info already exists, an exception * is thrown. */ - virtual RtecScheduler::handle_t create (const char * entry_point); + virtual RtecScheduler::handle_t create (const std::string entry_point); /// Lookup a handle for an RT_Info, and return its handle, or an error /// value if it's not present. - virtual RtecScheduler::handle_t lookup (const char * entry_point); + virtual RtecScheduler::handle_t lookup (const std::string entry_point); /// Return a pointer to the RT_Info corresponding to the passed handle. virtual RtecScheduler::RT_Info* get (RtecScheduler::handle_t handle); @@ -174,7 +174,7 @@ public: /// Returns the priority and subpriority values assigned to an RT_Info, /// based on its entry point name. - virtual void entry_point_priority (const char * entry_point, + virtual void entry_point_priority (const std::string entry_point, RtecScheduler::OS_Priority& o_priority, RtecScheduler::Preemption_Subpriority_t& p_subpriority, RtecScheduler::Preemption_Priority_t& p_priority); @@ -216,27 +216,27 @@ public: */ virtual void compute_scheduling (CORBA::Long minimum_priority, CORBA::Long maximum_priority, - RtecScheduler::RT_Info_Set_out infos, - RtecScheduler::Dependency_Set_out dependencies, - RtecScheduler::Config_Info_Set_out configs, - RtecScheduler::Scheduling_Anomaly_Set_out anomalies); + RtecScheduler::RT_Info_Set & infos, + RtecScheduler::Dependency_Set & dependencies, + RtecScheduler::Config_Info_Set & configs, + RtecScheduler::Scheduling_Anomaly_Set & anomalies); /// Recomputes the scheduling priorities, etc. virtual void recompute_scheduling (CORBA::Long minimum_priority, CORBA::Long maximum_priority, - RtecScheduler::Scheduling_Anomaly_Set_out anomalies); + RtecScheduler::Scheduling_Anomaly_Set & anomalies); /// Returns the set of rt_infos, with their assigned priorities (as /// of the last schedule re-computation). - virtual void get_rt_info_set (RtecScheduler::RT_Info_Set_out infos); + virtual void get_rt_info_set (RtecScheduler::RT_Info_Set & infos); /// Returns the set of rt_infos, with their assigned priorities (as /// of the last schedule re-computation). - virtual void get_dependency_set (RtecScheduler::Dependency_Set_out dependencies); + virtual void get_dependency_set (RtecScheduler::Dependency_Set & dependencies); /// Returns the set of config_infos, describing the appropriate /// number, types, and priority levels for the dispatching lanes. - virtual void get_config_info_set (RtecScheduler::Config_Info_Set_out configs); + virtual void get_config_info_set (RtecScheduler::Config_Info_Set & configs); /// Provides the thread priority and queue type for the given priority level. @@ -253,7 +253,7 @@ public: virtual RtecScheduler::Preemption_Priority_t last_scheduled_priority (void); /// Provides the set of Config_Infos associated with the current schedule. - virtual void get_config_infos (RtecScheduler::Config_Info_Set_out configs); + virtual void get_config_infos (RtecScheduler::Config_Info_Set & configs); // = Accessors that allow controlled relaxations of encapsulation. diff --git a/orbsvcs/orbsvcs/Sched/Scheduler.cpp b/orbsvcs/orbsvcs/Sched/Scheduler.cpp index 42973f57074..3e6bdb356bc 100644 --- a/orbsvcs/orbsvcs/Sched/Scheduler.cpp +++ b/orbsvcs/orbsvcs/Sched/Scheduler.cpp @@ -177,12 +177,12 @@ ACE_Scheduler::get_rt_info (Object_Name name, int ACE_Scheduler::number_of_dependencies(RT_Info* rt_info) { - return rt_info->dependencies.length(); + return rt_info->dependencies.size(); } int ACE_Scheduler::number_of_dependencies(RT_Info& rt_info) { - return rt_info.dependencies.length(); + return rt_info.dependencies.size(); } int ACE_Scheduler::add_dependency(RT_Info* rt_info, @@ -191,8 +191,8 @@ int ACE_Scheduler::add_dependency(RT_Info* rt_info, // ACE_DEBUG ((LM_DEBUG, "Sched (%t) adding dependency to: %s\n", // (const char*)rt_info->entry_point)); RtecScheduler::Dependency_Set& set = rt_info->dependencies; - int l = set.length(); - set.length(l + 1); + int l = set.size(); + set.resize(l + 1); set[l] = d; return 0; } diff --git a/orbsvcs/orbsvcs/Scheduler_Factory.cpp b/orbsvcs/orbsvcs/Scheduler_Factory.cpp index 823b31def06..668e47b5474 100644 --- a/orbsvcs/orbsvcs/Scheduler_Factory.cpp +++ b/orbsvcs/orbsvcs/Scheduler_Factory.cpp @@ -351,11 +351,11 @@ int ACE_Scheduler_Factory::dump_schedule // Indicate anomalies encountered during scheduling. - ACE_OS::fprintf(file, (anomalies.length () > 0 + ACE_OS::fprintf(file, (anomalies.size () > 0 ? start_anomalies_found : start_anomalies_none)); - for (i = 0; i < anomalies.length (); ++i) + for (i = 0; i < anomalies.size (); ++i) { const RtecScheduler::Scheduling_Anomaly& anomaly = anomalies[i]; switch (anomaly.severity) @@ -396,7 +396,7 @@ int ACE_Scheduler_Factory::dump_schedule ACE_OS::fprintf (file, start_infos); for (i = 0; - i < infos.length (); + i < infos.size (); ++i) { const RtecScheduler::RT_Info& info = infos[i]; @@ -441,7 +441,7 @@ int ACE_Scheduler_Factory::dump_schedule // Finish last line. ACE_OS::fprintf(file, "\n"); - if (infos.length () > 0) + if (infos.size () > 0) ACE_OS::fprintf (file, end_infos); else ACE_OS::fprintf (file, end_infos_empty); @@ -460,7 +460,7 @@ int ACE_Scheduler_Factory::dump_schedule ACE_OS::fprintf (file, start_dependencies); for (i = 0; - i < dependencies.length (); + i < dependencies.size (); ++i) { const RtecScheduler::Dependency_Info& dep = dependencies[i]; @@ -488,7 +488,7 @@ int ACE_Scheduler_Factory::dump_schedule // Finish last line. ACE_OS::fprintf (file, "\n"); - if (dependencies.length () > 0) + if (dependencies.size () > 0) ACE_OS::fprintf (file, end_dependencies); else ACE_OS::fprintf (file, end_dependencies_empty); @@ -498,7 +498,7 @@ int ACE_Scheduler_Factory::dump_schedule ACE_OS::fprintf (file, start_configs); for (i = 0; - i < configs.length (); + i < configs.size (); ++i) { if (i != 0) @@ -516,7 +516,7 @@ int ACE_Scheduler_Factory::dump_schedule // Finish last line. ACE_OS::fprintf (file, "\n"); - if (configs.length () > 0) + if (configs.size () > 0) ACE_OS::fprintf (file, end_configs); else ACE_OS::fprintf (file, end_configs_empty); |