From c17515c7614a218f3c03ac23fc87ba4d55c96496 Mon Sep 17 00:00:00 2001 From: cdgill Date: Tue, 13 Oct 1998 01:54:20 +0000 Subject: Fixed scheduler inconsistencies Amir reported --- TAO/orbsvcs/orbsvcs/Event/EC_Gateway.cpp | 2 +- TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp | 2 +- TAO/orbsvcs/orbsvcs/RtecScheduler.idl | 3 +- TAO/orbsvcs/orbsvcs/Runtime_Scheduler.cpp | 79 ++++++----- TAO/orbsvcs/orbsvcs/Sched/Config_Scheduler.cpp | 2 - TAO/orbsvcs/orbsvcs/Sched/DynSched.cpp | 122 ++++++++++------ TAO/orbsvcs/orbsvcs/Sched/DynSched.h | 1 + TAO/orbsvcs/orbsvcs/Sched/SchedEntry.cpp | 1 + TAO/orbsvcs/orbsvcs/Sched/SchedEntry.i | 3 +- TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp | 14 +- TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp | 4 +- TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.cpp | 45 +++--- TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.dsw | 17 ++- .../tests/Sched_Conf/Sched_Conf_Runtime.cpp | 157 +++++++++++++++++++++ .../tests/Sched_Conf/Sched_Conf_Runtime.dsp | 96 +++++++++++++ TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.h | 58 ++++++++ 16 files changed, 490 insertions(+), 116 deletions(-) create mode 100644 TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.cpp create mode 100644 TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.dsp create mode 100644 TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.h diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway.cpp index 59fcc98f024..e887c23d7d0 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway.cpp @@ -86,7 +86,7 @@ TAO_EC_Gateway_IIOP::init (RtecEventChannelAdmin::EventChannel_ptr rmt_ec, RtecScheduler::VERY_LOW_IMPORTANCE, time, 1, - RtecScheduler::OPERATION, + RtecScheduler::REMOTE_DEPENDANT, _env); if (_env.exception () != 0) return; diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp index 04e3d37b611..17175554ab6 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.cpp @@ -274,7 +274,7 @@ TAO_ECG_UDP_Receiver::init (RtecEventChannelAdmin::EventChannel_ptr lcl_ec, RtecScheduler::VERY_LOW_IMPORTANCE, time, 1, - RtecScheduler::OPERATION, + RtecScheduler::REMOTE_DEPENDANT, _env); if (_env.exception () != 0) return; } diff --git a/TAO/orbsvcs/orbsvcs/RtecScheduler.idl b/TAO/orbsvcs/orbsvcs/RtecScheduler.idl index b9035326884..4b0477c20b3 100644 --- a/TAO/orbsvcs/orbsvcs/RtecScheduler.idl +++ b/TAO/orbsvcs/orbsvcs/RtecScheduler.idl @@ -39,7 +39,8 @@ module RtecScheduler { OPERATION, CONJUNCTION, - DISJUNCTION + DISJUNCTION, + REMOTE_DEPENDANT }; enum Dependency_Type diff --git a/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.cpp b/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.cpp index 821de41e549..a2dc0c1362a 100644 --- a/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.cpp +++ b/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.cpp @@ -27,13 +27,13 @@ ACE_Runtime_Scheduler::create (const char * entry_point, TAO_THROW_SPEC ((CORBA::SystemException, RtecScheduler::DUPLICATE_NAME)) { - // Just make sure its there and returns its handle (position). + // Just make sure it's there and return its handle. int i; for (i = 0; i < entry_count_; ++i) { if (strcmp (entry_point, rt_info_[i].entry_point) == 0) { - return i; + return i + 1; } } // TODO: throw an exception or print an error. @@ -54,7 +54,7 @@ ACE_Runtime_Scheduler::get (RtecScheduler::handle_t handle, TAO_THROW_SPEC((CORBA::SystemException, RtecScheduler::UNKNOWN_TASK)) { - if (handle < 0 || handle > entry_count_) + if (handle <= 0 || handle > entry_count_) { TAO_THROW_RETURN (RtecScheduler::UNKNOWN_TASK(), 0); } @@ -65,20 +65,20 @@ ACE_Runtime_Scheduler::get (RtecScheduler::handle_t handle, RtecScheduler::RT_Info* info = new RtecScheduler::RT_Info; - info->entry_point = rt_info_[handle].entry_point; - info->handle = rt_info_[handle].handle; - info->worst_case_execution_time = rt_info_[handle].worst_case_execution_time; - info->typical_execution_time = rt_info_[handle].typical_execution_time; - info->cached_execution_time = rt_info_[handle].cached_execution_time; - info->period = rt_info_[handle].period; - info->criticality = RtecScheduler::Criticality(rt_info_[handle].criticality); - info->importance = RtecScheduler::Importance(rt_info_[handle].importance); - info->quantum = rt_info_[handle].quantum; - info->threads = rt_info_[handle].threads; - info->priority = rt_info_[handle].priority; - info->preemption_subpriority = rt_info_[handle].static_subpriority; - info->preemption_priority = rt_info_[handle].preemption_priority; - info->info_type = RtecScheduler::Info_Type(rt_info_[handle].info_type); + info->entry_point = rt_info_[handle - 1].entry_point; + info->handle = rt_info_[handle - 1].handle; + info->worst_case_execution_time = rt_info_[handle - 1].worst_case_execution_time; + info->typical_execution_time = rt_info_[handle - 1].typical_execution_time; + info->cached_execution_time = rt_info_[handle - 1].cached_execution_time; + info->period = rt_info_[handle - 1].period; + info->criticality = RtecScheduler::Criticality(rt_info_[handle - 1].criticality); + info->importance = RtecScheduler::Importance(rt_info_[handle - 1].importance); + info->quantum = rt_info_[handle - 1].quantum; + info->threads = rt_info_[handle - 1].threads; + info->priority = rt_info_[handle - 1].priority; + info->preemption_subpriority = rt_info_[handle - 1].static_subpriority; + info->preemption_priority = rt_info_[handle - 1].preemption_priority; + info->info_type = RtecScheduler::Info_Type(rt_info_[handle - 1].info_type); return info; } @@ -99,23 +99,25 @@ void ACE_Runtime_Scheduler::set (RtecScheduler::handle_t handle, { // We compare the values with the ones stored and print a message on // any differences. - if (handle < 0 || handle > entry_count_) + if (handle <= 0 || handle > entry_count_) { + ACE_DEBUG ((LM_DEBUG, "Unknown task: no entry for handle %d\n", + handle)); TAO_THROW (RtecScheduler::UNKNOWN_TASK()); // NOTREACHED } - if (rt_info_[handle].worst_case_execution_time != time - || rt_info_[handle].typical_execution_time != typical_time - || rt_info_[handle].cached_execution_time != cached_time - || rt_info_[handle].period != period - || rt_info_[handle].criticality != criticality - || rt_info_[handle].importance != importance - || rt_info_[handle].quantum != quantum - || rt_info_[handle].info_type != info_type - || rt_info_[handle].threads != threads) + if (rt_info_[handle - 1].worst_case_execution_time != time + || rt_info_[handle - 1].typical_execution_time != typical_time + || rt_info_[handle - 1].cached_execution_time != cached_time + || rt_info_[handle - 1].period != period + || rt_info_[handle - 1].criticality != criticality + || rt_info_[handle - 1].importance != importance + || rt_info_[handle - 1].quantum != quantum + || rt_info_[handle - 1].info_type != info_type + || rt_info_[handle - 1].threads != threads) { ACE_ERROR ((LM_ERROR, "invalid data for RT_Info: %s\n", - (const char*)rt_info_[handle].entry_point)); + (const char*)rt_info_[handle - 1].entry_point)); // TODO: throw something here. } } @@ -130,14 +132,15 @@ void ACE_Runtime_Scheduler::priority (RtecScheduler::handle_t handle, RtecScheduler::UNKNOWN_TASK, RtecScheduler::NOT_SCHEDULED)) { - if (handle < 0 || handle > entry_count_) + if (handle <= 0 || handle > entry_count_) { TAO_THROW (RtecScheduler::UNKNOWN_TASK()); // NOTREACHED } - priority = rt_info_[handle].priority; - subpriority = rt_info_[handle].static_subpriority; - p_priority = rt_info_[handle].preemption_priority; + + priority = rt_info_[handle - 1].priority; + subpriority = rt_info_[handle - 1].static_subpriority; + p_priority = rt_info_[handle - 1].preemption_priority; // ACE_DEBUG ((LM_DEBUG, "(%t) Returning priority %d\n", priority)); } @@ -168,14 +171,14 @@ void ACE_Runtime_Scheduler::add_dependency (RtecScheduler::handle_t handle, TAO_THROW_SPEC ((CORBA::SystemException, RtecScheduler::UNKNOWN_TASK)) { - if (handle < 0 || handle > entry_count_) + if (handle <= 0 || handle > entry_count_) { TAO_THROW (RtecScheduler::UNKNOWN_TASK()); // NOTREACHED } #if 0 // Just check that the information is consistent. - RtecScheduler::Dependency_Set& deps = rt_info_[handle]->dependencies; + RtecScheduler::Dependency_Set& deps = rt_info_[handle - 1]->dependencies; for (CORBA::ULong i = 0; i < deps.length (); ++i) { if (deps[i].rt_info == dependency @@ -186,7 +189,7 @@ void ACE_Runtime_Scheduler::add_dependency (RtecScheduler::handle_t handle, } } ACE_ERROR ((LM_ERROR, "unmatched dependency on %s\n", - (const char*)rt_info_[handle]->entry_point)); + (const char*)rt_info_[handle - 1]->entry_point)); #endif } @@ -208,9 +211,9 @@ void ACE_Runtime_Scheduler::compute_scheduling (CORBA::Long minimum_priority, void ACE_Runtime_Scheduler::dispatch_configuration(RtecScheduler::Preemption_Priority p_priority, - RtecScheduler::OS_Priority& priority, - RtecScheduler::Dispatching_Type & d_type, - CORBA::Environment &_env) + RtecScheduler::OS_Priority& priority, + RtecScheduler::Dispatching_Type & d_type, + CORBA::Environment &_env) TAO_THROW_SPEC ((CORBA::SystemException, RtecScheduler::NOT_SCHEDULED, RtecScheduler::UNKNOWN_PRIORITY_LEVEL)) diff --git a/TAO/orbsvcs/orbsvcs/Sched/Config_Scheduler.cpp b/TAO/orbsvcs/orbsvcs/Sched/Config_Scheduler.cpp index 9b28b0e10e6..f3ab7a88383 100644 --- a/TAO/orbsvcs/orbsvcs/Sched/Config_Scheduler.cpp +++ b/TAO/orbsvcs/orbsvcs/Sched/Config_Scheduler.cpp @@ -321,8 +321,6 @@ void ACE_Config_Scheduler::compute_scheduling (CORBA::Long minimum_priority, } - - void ACE_Config_Scheduler::dispatch_configuration (RtecScheduler::Preemption_Priority p_priority, RtecScheduler::OS_Priority& priority, RtecScheduler::Dispatching_Type & d_type, diff --git a/TAO/orbsvcs/orbsvcs/Sched/DynSched.cpp b/TAO/orbsvcs/orbsvcs/Sched/DynSched.cpp index 142e162a985..d7c016a325a 100644 --- a/TAO/orbsvcs/orbsvcs/Sched/DynSched.cpp +++ b/TAO/orbsvcs/orbsvcs/Sched/DynSched.cpp @@ -109,6 +109,8 @@ ACE_DynScheduler::status_message (ACE_DynScheduler::status_t status) return "INSUFFICIENT_THREAD_PRIORITY_LEVELS"; case ST_CYCLE_IN_DEPENDENCIES : return "CYCLE_IN_DEPENDENCIES"; + case ST_UNRESOLVED_REMOTE_DEPENDENCIES : + return "ST_UNRESOLVED_REMOTE_DEPENDENCIES"; case ST_INVALID_PRIORITY_ORDERING : return "INVALID_PRIORITY_ORDERING"; case UNABLE_TO_OPEN_SCHEDULE_FILE : @@ -243,7 +245,7 @@ ACE_DynScheduler::register_task (RT_Info *rt_info, handle_t &handle) ACE_DynScheduler::status_t ACE_DynScheduler::get_rt_info (Object_Name name, - RT_Info* &rtinfo) + RT_Info* &rtinfo) { handle_t handle; @@ -650,59 +652,79 @@ ACE_DynScheduler::schedule (void) status_ = identify_threads (); } - if (status_ == SUCCEEDED) + if ((status_ == SUCCEEDED) || (status_ == ST_UNRESOLVED_REMOTE_DEPENDENCIES)) { // invokes the internal thread scheduling method of the strategy - status_ = schedule_threads (); + temp_status = schedule_threads (); + if (temp_status != SUCCEEDED) + { + status_ == temp_status; + } } - if (status_ == SUCCEEDED) + if ((status_ == SUCCEEDED) || (status_ == ST_UNRESOLVED_REMOTE_DEPENDENCIES)) { // propagate the dispatch information from the // threads throughout the call graph - status_ = propagate_dispatches (); + temp_status = propagate_dispatches (); + if (temp_status != SUCCEEDED) + { + status_ == temp_status; + } } - if (status_ == SUCCEEDED) + if ((status_ == SUCCEEDED) || (status_ == ST_UNRESOLVED_REMOTE_DEPENDENCIES)) { // invokes the internal dispatch scheduling method of the strategy - status_ = schedule_dispatches (); + temp_status = schedule_dispatches (); + if (temp_status != SUCCEEDED) + { + status_ == temp_status; + } } // calculate utilization, total frame size, critical set - if (status_ == SUCCEEDED) + if ((status_ == SUCCEEDED) || (status_ == ST_UNRESOLVED_REMOTE_DEPENDENCIES)) { - status_ = calculate_utilization_params (); + temp_status = calculate_utilization_params (); + if (temp_status != SUCCEEDED) + { + status_ == temp_status; + } } // calculate utilization, total frame size, critical set - if ((status_ == SUCCEEDED) || (status_ == ST_UTILIZATION_BOUND_EXCEEDED)) + if ((status_ == SUCCEEDED) || (status_ == ST_UTILIZATION_BOUND_EXCEEDED) || + (status_ == ST_UNRESOLVED_REMOTE_DEPENDENCIES)) { - status_ = store_assigned_info (); + temp_status = store_assigned_info (); + if (temp_status != SUCCEEDED) + { + status_ == temp_status; + } } // generate the scheduling timeline over the total frame size - if ((status_ == SUCCEEDED) || (status_ == ST_UTILIZATION_BOUND_EXCEEDED)) + if ((status_ == SUCCEEDED) || (status_ == ST_UTILIZATION_BOUND_EXCEEDED) || + (status_ == ST_UNRESOLVED_REMOTE_DEPENDENCIES)) { temp_status = create_timeline (); - } - - if (temp_status != SUCCEEDED) - { - status_ = temp_status; + if (temp_status != SUCCEEDED) + { + status_ = temp_status; + } } // store the timeline to a file if one was given if ((timeline_filename_ != 0) && ((status_ == SUCCEEDED) || (status_ == ST_UTILIZATION_BOUND_EXCEEDED))) - { - temp_status = output_timeline (timeline_filename_, 0); - } - - if (temp_status != SUCCEEDED) - { - status_ = temp_status; - } + { + temp_status = output_timeline (timeline_filename_, 0); + if (temp_status != SUCCEEDED) + { + status_ = temp_status; + } + } // if a valid schedule was not generated, clean up from the attempt switch (status_) @@ -710,6 +732,7 @@ ACE_DynScheduler::schedule (void) // these are statuses that indicate a reasonable schedule was generated case SUCCEEDED: case ST_UTILIZATION_BOUND_EXCEEDED: + case ST_UNRESOLVED_REMOTE_DEPENDENCIES: // if we made it here, the schedule is done up_to_date_ = 1; @@ -810,9 +833,12 @@ ACE_DynScheduler::calculate_utilization_params (void) minimum_priority_queue_ = ordered_dispatch_entries_ [i]->priority (); } - // only consider computation times of dispatches on OPERATION descriptors - if ((ordered_dispatch_entries_ [i]->task_entry ().info_type () == - RtecScheduler::OPERATION) && + // Only consider computation times of dispatches of + // OPERATION and REMOTE_DEPENDANT descriptors. + if (((ordered_dispatch_entries_ [i]->task_entry ().info_type () == + RtecScheduler::OPERATION) || + (ordered_dispatch_entries_ [i]->task_entry ().info_type () == + RtecScheduler::REMOTE_DEPENDANT)) && (ordered_dispatch_entries_ [i]->task_entry ().effective_period () > 0)) { utilization_ += @@ -1018,6 +1044,7 @@ ACE_DynScheduler::status_t ACE_DynScheduler::identify_threads (void) { u_int i, j; + ACE_DynScheduler::status_t result = SUCCEEDED; // walk array of task entries, picking out thread delineators for (i = 0; i < tasks_; i++) @@ -1062,21 +1089,30 @@ ACE_DynScheduler::identify_threads (void) ++ threads_; } } + else if (task_entries_ [i].rt_info ()->info_type == RtecScheduler::REMOTE_DEPENDANT) + { + // Warn about unresolved remote dependencies + result = ST_UNRESOLVED_REMOTE_DEPENDENCIES; + ACE_DEBUG ( + (LM_DEBUG, + "An operation identified by \"%s\" has unresolved remote dependencies\n.", + (const char*) task_entries_ [i].rt_info ()->entry_point)); + } else - { - // node that no one calls and has neither rate nor threads is suspect - ACE_ERROR_RETURN ( - (LM_ERROR, - "An operation identified by \"%s\" does not specify a period or\n" - "visible threads, and is not called by any other operation. " - "Are there backwards dependencies?\n", - (const char*) task_entries_ [i].rt_info ()->entry_point), - ST_BAD_DEPENDENCIES_ON_TASK); - } + { + // Local node that no one calls and has neither rate nor threads is suspect + ACE_ERROR_RETURN ( + (LM_ERROR, + "An operation identified by \"%s\" does not specify a period or\n" + "visible threads, and is not called by any other operation. " + "Are there backwards dependencies?\n", + (const char*) task_entries_ [i].rt_info ()->entry_point), + ST_BAD_DEPENDENCIES_ON_TASK); + } } } - return SUCCEEDED; + return result; } ACE_DynScheduler::status_t @@ -1305,9 +1341,11 @@ ACE_DynScheduler::create_timeline () max_dispatch_id_ = ordered_dispatch_entries_[i]->dispatch_id (); } - // only put OPERATION dispatches into the timeline. - if (ordered_dispatch_entries_[i]->task_entry().info_type () != - RtecScheduler::OPERATION) + // only put OPERATION and REMOTE_DEPENDANT dispatches into the timeline. + if ((ordered_dispatch_entries_[i]->task_entry().info_type () != + RtecScheduler::OPERATION) && + (ordered_dispatch_entries_[i]->task_entry().info_type () != + RtecScheduler::REMOTE_DEPENDANT)) { continue; } diff --git a/TAO/orbsvcs/orbsvcs/Sched/DynSched.h b/TAO/orbsvcs/orbsvcs/Sched/DynSched.h index 5c94f954eb9..3d44e52ca59 100644 --- a/TAO/orbsvcs/orbsvcs/Sched/DynSched.h +++ b/TAO/orbsvcs/orbsvcs/Sched/DynSched.h @@ -89,6 +89,7 @@ public: , ST_UTILIZATION_BOUND_EXCEEDED , ST_INSUFFICIENT_THREAD_PRIORITY_LEVELS , ST_CYCLE_IN_DEPENDENCIES + , ST_UNRESOLVED_REMOTE_DEPENDENCIES , ST_INVALID_PRIORITY_ORDERING , UNABLE_TO_OPEN_SCHEDULE_FILE , UNABLE_TO_WRITE_SCHEDULE_FILE diff --git a/TAO/orbsvcs/orbsvcs/Sched/SchedEntry.cpp b/TAO/orbsvcs/orbsvcs/Sched/SchedEntry.cpp index 860bcd5e0bf..ff2072d4dcd 100644 --- a/TAO/orbsvcs/orbsvcs/Sched/SchedEntry.cpp +++ b/TAO/orbsvcs/orbsvcs/Sched/SchedEntry.cpp @@ -165,6 +165,7 @@ Task_Entry::merge_dispatches (ACE_Unbounded_Set &dispatch_ent break; case RtecScheduler::OPERATION: + case RtecScheduler::REMOTE_DEPENDANT: // disjunctively merge the operation's two-way dispatches, // and conjunctively merge its one-way dispatches. diff --git a/TAO/orbsvcs/orbsvcs/Sched/SchedEntry.i b/TAO/orbsvcs/orbsvcs/Sched/SchedEntry.i index 777bb86fc5c..772770706b2 100644 --- a/TAO/orbsvcs/orbsvcs/Sched/SchedEntry.i +++ b/TAO/orbsvcs/orbsvcs/Sched/SchedEntry.i @@ -135,7 +135,8 @@ Task_Entry::effective_execution_time () const ACE_UINT32 worst_case_execution_time = ACE_U64_TO_U32 (rt_info_->worst_case_execution_time); - return (rt_info_->info_type == RtecScheduler::OPERATION) + return ((rt_info_->info_type == RtecScheduler::OPERATION) || + (rt_info_->info_type == RtecScheduler::REMOTE_DEPENDANT)) ? worst_case_execution_time * dispatches_.size () : 0; } diff --git a/TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp b/TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp index 508f9f699fb..5553cde5589 100644 --- a/TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/Scheduler_Factory.cpp @@ -51,7 +51,7 @@ static ACE_Scheduler_Factory_Data *ace_scheduler_factory_data = 0; int ACE_Scheduler_Factory::use_runtime (int cc, POD_Config_Info cfgi[], - int ec, + int ec, POD_RT_Info rti[]) { if (server_ != 0 || TAO_SF_entry_count != -1) @@ -186,7 +186,7 @@ static char footer[] = "\n" "// This sets up Scheduler_Factory to use the runtime version\n" "int scheduler_factory_setup = \n" -" ACE_Scheduler_Factory::use_runtime (infos_size, infos);\n" +" ACE_Scheduler_Factory::use_runtime (configs_size, configs, infos_size, infos);\n" "\n" "// EOF\n"; @@ -221,11 +221,12 @@ int ACE_Scheduler_Factory::dump_schedule const char* config_info_format) { u_int i; + char entry_point [BUFSIZ]; // default format for printing RT_Info output if (rt_info_format == 0) { - rt_info_format = "{ \"%20s\", %10d, %10d, %10d, " + rt_info_format = "{%20s, %10d, %10d, %10d, " "%10d, %10d, " "(RtecScheduler::Criticality) %d, " "(RtecScheduler::Importance) %d, " @@ -260,12 +261,17 @@ int ACE_Scheduler_Factory::dump_schedule // Finish previous line ACE_OS::fprintf(file, ",\n"); } + const RtecScheduler::RT_Info& info = infos[i]; + + // Put quotes around the entry point name, exactly as it is stored. + ACE_OS::sprintf (entry_point, "\"%s\"", (const char*) info.entry_point); + // @@ TODO Eventually the TimeT structure will be a 64-bit // unsigned int, we will have to change this dump method then. ACE_OS::fprintf (file, rt_info_format, - (const char*) info.entry_point, + entry_point, info.handle, ACE_CU64_TO_CU32 (info.worst_case_execution_time), ACE_CU64_TO_CU32 (info.typical_execution_time), diff --git a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp index 7b7e91d23d3..901708a087c 100644 --- a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp +++ b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp @@ -299,7 +299,7 @@ Test_ECG::run (int argc, char* argv[]) ACE_Scheduler_Factory::use_runtime ( sizeof (runtime_configs_2)/sizeof (runtime_configs_2[0]), runtime_configs_2, - sizeof (runtime_infos_2)/sizeof (runtime_infos_2[0]), + sizeof (runtime_infos_2)/sizeof (runtime_infos_2[0]), runtime_infos_2); scheduler_impl = @@ -319,7 +319,7 @@ Test_ECG::run (int argc, char* argv[]) ACE_Scheduler_Factory::use_runtime ( sizeof (runtime_configs_3)/sizeof (runtime_configs_3[0]), runtime_configs_3, - sizeof (runtime_infos_3)/sizeof (runtime_infos_3[0]), + sizeof (runtime_infos_3)/sizeof (runtime_infos_3[0]), runtime_infos_3); scheduler_impl = diff --git a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.cpp b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.cpp index 3cbda4e23cc..a66376473f9 100644 --- a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.cpp +++ b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.cpp @@ -1,7 +1,7 @@ // $Id$ -// This program simulates a scheduler configuration run, -// and dumps the results of one scheduling in a C++ file. +// This program performa a simple scheduler configuration run, +// and dumps the results of one scheduling into a C++ header file. #include "ace/Sched_Params.h" #include "ace/Get_Opt.h" @@ -15,12 +15,11 @@ ACE_RCSID(Sched_Conf, Sched_Conf, "$Id$") const char* service_name = "ScheduleService"; -const char* format_string = "{\"%s\", %d, {%d,%d}, {%d,%d}, " - "{%d,%d}, %7d, " +const char* format_string = "{%-12s, %d, %d, %d, %d, %8d, " "(RtecScheduler::Criticality) %d, " "(RtecScheduler::Importance) %d, " - "{%d,%d}, %d, %2d, %d, %d, " - "(RtecScheduler::Info_Type) %d }"; + "%d, %d, %3d, %d, %d, " + "(RtecScheduler::Info_Type) %d}\n"; int parse_args (int argc, char *argv []) @@ -61,7 +60,7 @@ main (int argc, char *argv[]) const int operation_count = 16; ACE_Scheduler_Factory::POD_RT_Info config_infos[operation_count] = { // 20 Hz high criticality supplier - { "hi_20_S", // entry point + { "high_20_S", // entry point 0, // handle 0, // worst case execution time 0, // typical execution time (unused) @@ -77,7 +76,7 @@ main (int argc, char *argv[]) RtecScheduler::OPERATION // info type }, // 20 Hz low criticality supplier - { "lo_20_S", // entry point + { "low_20_S", // entry point 0, // handle 0, // worst case execution time 0, // typical execution time (unused) @@ -93,7 +92,7 @@ main (int argc, char *argv[]) RtecScheduler::OPERATION // info type }, // 10 Hz high criticality supplier - { "hi_10_S", // entry point + { "high_10_S", // entry point 0, // handle 0, // worst case execution time 0, // typical execution time (unused) @@ -109,7 +108,7 @@ main (int argc, char *argv[]) RtecScheduler::OPERATION // info type }, // 10 Hz low criticality supplier - { "lo_10_S", // entry point + { "low_10_S", // entry point 0, // handle 0, // worst case execution time 0, // typical execution time (unused) @@ -125,7 +124,7 @@ main (int argc, char *argv[]) RtecScheduler::OPERATION // info type }, // 5 Hz high criticality supplier - { "hi_05_S", // entry point + { "high_05_S", // entry point 0, // handle 0, // worst case execution time 0, // typical execution time (unused) @@ -141,7 +140,7 @@ main (int argc, char *argv[]) RtecScheduler::OPERATION // info type }, // 5 Hz low criticality supplier - { "lo_05_S", // entry point + { "low_05_S", // entry point 0, // handle 0, // worst case execution time 0, // typical execution time (unused) @@ -157,7 +156,7 @@ main (int argc, char *argv[]) RtecScheduler::OPERATION // info type }, // 1 Hz high criticality supplier - { "hi_01_S", // entry point + { "high_01_S", // entry point 0, // handle 0, // worst case execution time 0, // typical execution time (unused) @@ -173,7 +172,7 @@ main (int argc, char *argv[]) RtecScheduler::OPERATION // info type }, // 1 Hz low criticality supplier - { "lo_01_S", // entry point + { "low_01_S", // entry point 0, // handle 0, // worst case execution time 0, // typical execution time (unused) @@ -189,7 +188,7 @@ main (int argc, char *argv[]) RtecScheduler::OPERATION // info type }, // 20 Hz high criticality consumer - { "hi_20_C", // entry point + { "high_20_C", // entry point 0, // handle 0, // worst case execution time 0, // typical execution time (unused) @@ -205,7 +204,7 @@ main (int argc, char *argv[]) RtecScheduler::OPERATION // info type }, // 20 Hz low criticality consumer - { "lo_20_C", // entry point + { "low_20_C", // entry point 0, // handle 0, // worst case execution time 0, // typical execution time (unused) @@ -221,7 +220,7 @@ main (int argc, char *argv[]) RtecScheduler::OPERATION // info type }, // 10 Hz high criticality consumer - { "hi_10_C", // entry point + { "high_10_C", // entry point 0, // handle 0, // worst case execution time 0, // typical execution time (unused) @@ -237,7 +236,7 @@ main (int argc, char *argv[]) RtecScheduler::OPERATION // info type }, // 10 Hz low criticality consumer - { "lo_10_C", // entry point + { "low_10_C", // entry point 0, // handle 0, // worst case execution time 0, // typical execution time (unused) @@ -253,7 +252,7 @@ main (int argc, char *argv[]) RtecScheduler::OPERATION // info type }, // 5 Hz high criticality consumer - { "hi_05_C", // entry point + { "high_05_C", // entry point 0, // handle 0, // worst case execution time 0, // typical execution time (unused) @@ -269,7 +268,7 @@ main (int argc, char *argv[]) RtecScheduler::OPERATION // info type }, // 5 Hz low criticality consumer - { "lo_05_C", // entry point + { "low_05_C", // entry point 0, // handle 0, // worst case execution time 0, // typical execution time (unused) @@ -285,7 +284,7 @@ main (int argc, char *argv[]) RtecScheduler::OPERATION // info type }, // 1 Hz high criticality consumer - { "hi_01_C", // entry point + { "high_01_C", // entry point 0, // handle 0, // worst case execution time 0, // typical execution time (unused) @@ -301,7 +300,7 @@ main (int argc, char *argv[]) RtecScheduler::OPERATION // info type }, // 10 Hz low criticality consumer - { "lo_01_C", // entry point + { "low_01_C", // entry point 0, // handle 0, // worst case execution time 0, // typical execution time (unused) @@ -427,7 +426,7 @@ main (int argc, char *argv[]) TAO_CHECK_ENV; ACE_Scheduler_Factory::dump_schedule (infos.in (), - configs.in (), + configs.in (), "Sched_Conf_Runtime.h", format_string); } diff --git a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.dsw b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.dsw index 18862066341..1a6ff162cd2 100644 --- a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.dsw +++ b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf.dsw @@ -1,4 +1,4 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 +Microsoft Developer Studio Workspace File, Format Version 5.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### @@ -15,6 +15,21 @@ Package=<4> ############################################################################### +Project: "Sched_Conf_Runtime"=.\Sched_Conf_Runtime.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name Sched_Conf + End Project Dependency +}}} + +############################################################################### + Global: Package=<5> diff --git a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.cpp b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.cpp new file mode 100644 index 00000000000..ec2e666c453 --- /dev/null +++ b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.cpp @@ -0,0 +1,157 @@ +// $Id$ + +// This program exercises a run-time scheduler, +// using the config run generated C++ header file. + +#include "ace/Sched_Params.h" +#include "ace/Get_Opt.h" +#include "tao/corba.h" + +#include "orbsvcs/CosNamingC.h" +#include "orbsvcs/Scheduler_Factory.h" +#include "orbsvcs/Naming/Naming_Utils.h" + +#include "Sched_Conf_Runtime.h" + +ACE_RCSID(Sched_Conf, Sched_Conf_Runtime, "$Id$") + + + +int +main (int argc, char *argv[]) +{ + TAO_TRY + { + // Initialize ORB. + CORBA::ORB_var orb = + CORBA::ORB_init (argc, argv, "internet", TAO_TRY_ENV); + TAO_CHECK_ENV; + + CORBA::Object_var poa_object = + orb->resolve_initial_references("RootPOA"); + if (CORBA::is_nil(poa_object.in ())) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to initialize the POA.\n"), + 1); + + PortableServer::POA_var root_poa = + PortableServer::POA::_narrow (poa_object.in(), TAO_TRY_ENV); + TAO_CHECK_ENV; + + PortableServer::POAManager_var poa_manager = + root_poa->the_POAManager (TAO_TRY_ENV); + TAO_CHECK_ENV; + + // Store a pointer to the local run-time scheduler. + RtecScheduler::Scheduler_ptr runtime_scheduler = + ACE_Scheduler_Factory::server (); + + // Some useful variables for retrieving values from the scheduler. + RtecScheduler::RT_Info *rt_info = 0; + RtecScheduler::OS_Priority priority; + RtecScheduler::Preemption_Subpriority subpriority; + RtecScheduler::Preemption_Priority p_priority; + RtecScheduler::Dispatching_Type dispatching_type; + + for (int i = 0; i < infos_size; ++i) + { + // Make sure the correct handle is returned by the + // run-time scheduler's create and lookup methods. + ACE_ASSERT (infos [i].handle == + runtime_scheduler->create (infos [i].entry_point, + TAO_TRY_ENV)); + ACE_ASSERT (infos [i].handle == + runtime_scheduler->lookup (infos [i].entry_point, + TAO_TRY_ENV)); + + // Make sure the values in the RT_Info returned by get are OK. + delete rt_info; + rt_info = runtime_scheduler->get (infos [i].handle, + TAO_TRY_ENV); + ACE_ASSERT (rt_info != 0); + ACE_ASSERT (ACE_OS::strcmp (rt_info->entry_point, + infos [i].entry_point) == 0); + ACE_ASSERT (rt_info->handle == + infos [i].handle); + ACE_ASSERT (rt_info->worst_case_execution_time == + infos [i].worst_case_execution_time); + ACE_ASSERT (rt_info->typical_execution_time == + infos [i].typical_execution_time); + ACE_ASSERT (rt_info->cached_execution_time == + infos [i].cached_execution_time); + ACE_ASSERT (rt_info->period == + infos [i].period); + ACE_ASSERT (rt_info->criticality == + RtecScheduler::Criticality(infos [i].criticality)); + ACE_ASSERT (rt_info->importance == + RtecScheduler::Importance(infos [i].importance)); + ACE_ASSERT (rt_info->quantum == + infos [i].quantum); + ACE_ASSERT (rt_info->threads == + infos [i].threads); + ACE_ASSERT (rt_info->priority == + infos [i].priority); + ACE_ASSERT (rt_info->preemption_subpriority == + infos [i].static_subpriority); + ACE_ASSERT (rt_info->preemption_priority == + infos [i].preemption_priority); + ACE_ASSERT (rt_info->info_type == + RtecScheduler::Info_Type(infos [i].info_type)); + + // Make sure the values in the scheduler's internal RT_Info are OK. + // Scheduler will generate messages if any values don't match. + runtime_scheduler->set (infos [i].handle, + RtecScheduler::Criticality(infos [i].criticality), + infos [i].worst_case_execution_time, + infos [i].typical_execution_time, + infos [i].cached_execution_time, + infos [i].period, + RtecScheduler::Importance(infos [i].importance), + infos [i].quantum, + infos [i].threads, + RtecScheduler::Info_Type(infos [i].info_type), + TAO_TRY_ENV); + + // Make sure the correct priority values are returned. + runtime_scheduler->priority (infos [i].handle, + priority, + subpriority, + p_priority, + TAO_TRY_ENV); + ACE_ASSERT (priority == infos [i].priority); + ACE_ASSERT (subpriority == infos [i].static_subpriority); + ACE_ASSERT (p_priority == infos [i].preemption_priority); + runtime_scheduler->entry_point_priority (infos [i].entry_point, + priority, + subpriority, + p_priority, + TAO_TRY_ENV); + ACE_ASSERT (priority == infos [i].priority); + ACE_ASSERT (subpriority == infos [i].static_subpriority); + ACE_ASSERT (p_priority == infos [i].preemption_priority); + } + + for (int j = 0; j < configs_size; ++j) + { + // Make sure the correct preemption priority is stored. + ACE_ASSERT (j == configs [j].preemption_priority); + + // Make sure the correct queue configuration values are returned. + runtime_scheduler-> + dispatch_configuration (configs [j].preemption_priority, + priority, + dispatching_type, + TAO_TRY_ENV); + ACE_ASSERT (priority == configs [j].thread_priority); + ACE_ASSERT (dispatching_type == configs [j].dispatching_type); + + } + } + TAO_CATCH (CORBA::SystemException, sys_ex) + { + TAO_TRY_ENV.print_exception ("SYS_EX"); + } + TAO_ENDTRY; + + return 0; +} diff --git a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.dsp b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.dsp new file mode 100644 index 00000000000..27fc5e6f3b7 --- /dev/null +++ b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.dsp @@ -0,0 +1,96 @@ +# Microsoft Developer Studio Project File - Name="Sched_Conf_Runtime" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 5.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=Sched_Conf_Runtime - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Sched_Conf_Runtime.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Sched_Conf_Runtime.mak"\ + CFG="Sched_Conf_Runtime - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Sched_Conf_Runtime - Win32 Release" (based on\ + "Win32 (x86) Console Application") +!MESSAGE "Sched_Conf_Runtime - Win32 Debug" (based on\ + "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Sched_Conf_Runtime - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "Sched_Conf_Runtime - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Sched_Co" +# PROP BASE Intermediate_Dir "Sched_Co" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 orbsvcsd.lib TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace" + +!ENDIF + +# Begin Target + +# Name "Sched_Conf_Runtime - Win32 Release" +# Name "Sched_Conf_Runtime - Win32 Debug" +# Begin Source File + +SOURCE=.\Sched_Conf_Runtime.cpp +# End Source File +# Begin Source File + +SOURCE=.\Sched_Conf_Runtime.h +# End Source File +# End Target +# End Project diff --git a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.h b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.h new file mode 100644 index 00000000000..25ea80ad2de --- /dev/null +++ b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.h @@ -0,0 +1,58 @@ +// $Id$ + +// This file was automatically generated by Scheduler_Factory +// before editing the file please consider generating it again + +#include "orbsvcs/Scheduler_Factory.h" + +static ACE_Scheduler_Factory::POD_RT_Info infos[] = { +{"high_20_S" , 1, 0, 0, 0, 500000, (RtecScheduler::Criticality) 3, (RtecScheduler::Importance) 1, 0, 1, 15, 9, 0, (RtecScheduler::Info_Type) 0} +, +{"low_20_S" , 2, 0, 0, 0, 500000, (RtecScheduler::Criticality) 1, (RtecScheduler::Importance) 3, 0, 1, 2, 9, 1, (RtecScheduler::Info_Type) 0} +, +{"high_10_S" , 3, 0, 0, 0, 1000000, (RtecScheduler::Criticality) 3, (RtecScheduler::Importance) 1, 0, 1, 15, 6, 0, (RtecScheduler::Info_Type) 0} +, +{"low_10_S" , 4, 0, 0, 0, 1000000, (RtecScheduler::Criticality) 1, (RtecScheduler::Importance) 3, 0, 1, 2, 6, 1, (RtecScheduler::Info_Type) 0} +, +{"high_05_S" , 5, 0, 0, 0, 2000000, (RtecScheduler::Criticality) 3, (RtecScheduler::Importance) 1, 0, 1, 15, 3, 0, (RtecScheduler::Info_Type) 0} +, +{"low_05_S" , 6, 0, 0, 0, 2000000, (RtecScheduler::Criticality) 1, (RtecScheduler::Importance) 3, 0, 1, 2, 3, 1, (RtecScheduler::Info_Type) 0} +, +{"high_01_S" , 7, 0, 0, 0, 10000000, (RtecScheduler::Criticality) 3, (RtecScheduler::Importance) 1, 0, 1, 15, 0, 0, (RtecScheduler::Info_Type) 0} +, +{"low_01_S" , 8, 0, 0, 0, 10000000, (RtecScheduler::Criticality) 1, (RtecScheduler::Importance) 3, 0, 1, 2, 0, 1, (RtecScheduler::Info_Type) 0} +, +{"high_20_C" , 9, 0, 0, 0, 0, (RtecScheduler::Criticality) 3, (RtecScheduler::Importance) 1, 0, 0, 15, 10, 0, (RtecScheduler::Info_Type) 0} +, +{"low_20_C" , 10, 0, 0, 0, 0, (RtecScheduler::Criticality) 1, (RtecScheduler::Importance) 3, 0, 0, 2, 10, 1, (RtecScheduler::Info_Type) 0} +, +{"high_10_C" , 11, 0, 0, 0, 0, (RtecScheduler::Criticality) 3, (RtecScheduler::Importance) 1, 0, 0, 15, 7, 0, (RtecScheduler::Info_Type) 0} +, +{"low_10_C" , 12, 0, 0, 0, 0, (RtecScheduler::Criticality) 1, (RtecScheduler::Importance) 3, 0, 0, 2, 7, 1, (RtecScheduler::Info_Type) 0} +, +{"high_05_C" , 13, 0, 0, 0, 0, (RtecScheduler::Criticality) 3, (RtecScheduler::Importance) 1, 0, 0, 15, 4, 0, (RtecScheduler::Info_Type) 0} +, +{"low_05_C" , 14, 0, 0, 0, 0, (RtecScheduler::Criticality) 1, (RtecScheduler::Importance) 3, 0, 0, 2, 4, 1, (RtecScheduler::Info_Type) 0} +, +{"high_01_C" , 15, 0, 0, 0, 0, (RtecScheduler::Criticality) 3, (RtecScheduler::Importance) 1, 0, 0, 15, 1, 0, (RtecScheduler::Info_Type) 0} +, +{"low_01_C" , 16, 0, 0, 0, 0, (RtecScheduler::Criticality) 1, (RtecScheduler::Importance) 3, 0, 0, 2, 1, 1, (RtecScheduler::Info_Type) 0} + +}; + +static int infos_size = sizeof(infos)/sizeof(infos[0]); + + +static ACE_Scheduler_Factory::POD_Config_Info configs[] = { + { 0, 15, (RtecScheduler::Dispatching_Type) 2 }, + { 1, 2, (RtecScheduler::Dispatching_Type) 2 } +}; + +static int configs_size = sizeof(configs)/sizeof(configs[0]); + + +// This sets up Scheduler_Factory to use the runtime version +int scheduler_factory_setup = + ACE_Scheduler_Factory::use_runtime (configs_size, configs, infos_size, infos); + +// EOF -- cgit v1.2.1