diff options
author | cdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-11 17:20:47 +0000 |
---|---|---|
committer | cdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-11 17:20:47 +0000 |
commit | 400c1b3e24556a704ff6be8f61ad43251dbcae4b (patch) | |
tree | b512602cbf8cffe3b72d2ad3f03625cf5e244238 | |
parent | 0009342d192b73ac575f758e4b61ba3ddc39ebea (diff) | |
download | ATCD-400c1b3e24556a704ff6be8f61ad43251dbcae4b.tar.gz |
Fixes for nightly build log errors and warnings.
-rw-r--r-- | TAO/ChangeLog-99c | 7 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Sched/Reconfig_Sched_Utils.cpp | 42 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Sched/Reconfig_Sched_Utils.h | 5 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.cpp | 48 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.h | 5 |
5 files changed, 57 insertions, 50 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index 7ba0c683ced..840d5fa55e2 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,10 @@ +Sun Jul 11 12:15:00 1999 Chris Gill <cdgill@cs.wustl.edu> + + * Reconfig_Scheduler_T.{cpp, h}, + Reconfig_Sched_Utils.{cpp, h}: Fixes for nightly build log errors and warnings. + Changed exception from UNKNOWN_TASK to INTERNAL, added ACE_TYPENAME for traits, + moved DFS ordering function from scheduler to scheduling strategy. + Sun Jul 11 03:25:07 1999 Nanbor Wang <nanbor@cs.wustl.edu> * orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.cpp diff --git a/TAO/orbsvcs/orbsvcs/Sched/Reconfig_Sched_Utils.cpp b/TAO/orbsvcs/orbsvcs/Sched/Reconfig_Sched_Utils.cpp index 6f5624c03bc..c2ccc3136f3 100644 --- a/TAO/orbsvcs/orbsvcs/Sched/Reconfig_Sched_Utils.cpp +++ b/TAO/orbsvcs/orbsvcs/Sched/Reconfig_Sched_Utils.cpp @@ -60,7 +60,7 @@ TAO_Reconfig_Scheduler_Entry (RtecScheduler::RT_Info &rt_info) effective_exec_multiplier_ (0), effective_period_ (0) { - // Store the RT_Info fields. + // Store the RT_Info fields. this->orig_rt_info_data (*actual_rt_info_); } @@ -389,6 +389,46 @@ TAO_RSE_Reset_Visitor::visit (TAO_Reconfig_Scheduler_Entry &rse) // class TAO_MUF_Reconfig_Sched_Strategy // /////////////////////////////////////////// +// Ordering function to compare the DFS finish times of +// two task entries, so qsort orders these in topological +// order, with the higher times *first* +int +TAO_MUF_Reconfig_Sched_Strategy::comp_entry_finish_times (const void *first, const void *second) +{ + const TAO_Reconfig_Scheduler_Entry *first_entry = + * ACE_reinterpret_cast (const TAO_Reconfig_Scheduler_Entry *const *, + first); + + const TAO_Reconfig_Scheduler_Entry *second_entry = + * ACE_reinterpret_cast (const TAO_Reconfig_Scheduler_Entry *const *, + second); + + // sort blank entries to the end + if (! first_entry) + { + return (second_entry) ? 1 : 0; + } + else if (! second_entry) + { + return -1; + } + + // Sort entries with higher forward DFS finishing times before those + // with lower forward DFS finishing times. + if (first_entry->fwd_finished () > + second_entry->fwd_finished ()) + { + return -1; + } + else if (first_entry->fwd_finished () < + second_entry->fwd_finished ()) + { + return 1; + } + + return 0; +} + // Ordering function used to qsort an array of TAO_Reconfig_Scheduler_Entry // pointers into a total <priority, subpriority> ordering. Returns -1 if the // first one is higher, 0 if they're the same, and 1 if the second one is higher. diff --git a/TAO/orbsvcs/orbsvcs/Sched/Reconfig_Sched_Utils.h b/TAO/orbsvcs/orbsvcs/Sched/Reconfig_Sched_Utils.h index de8ef81c5bb..472dc5f6cb1 100644 --- a/TAO/orbsvcs/orbsvcs/Sched/Reconfig_Sched_Utils.h +++ b/TAO/orbsvcs/orbsvcs/Sched/Reconfig_Sched_Utils.h @@ -238,6 +238,11 @@ class TAO_ORBSVCS_Export TAO_MUF_Reconfig_Sched_Strategy { public: + static int comp_entry_finish_times (const void *first, const void *second); + // Ordering function to compare the DFS finish times of + // two task entries, so qsort orders these in topological + // order, with the higher times *first*. + static int total_priority_comp (const void *, const void *); // Ordering function used to qsort an array of // TAO_Reconfig_Scheduler_Entry pointers into a total <priority, diff --git a/TAO/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.cpp b/TAO/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.cpp index 56062c9efdf..51f372aaa1d 100644 --- a/TAO/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.cpp +++ b/TAO/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.cpp @@ -689,7 +689,7 @@ compute_scheduling (CORBA::Long minimum_priority, } infos->length (this->rt_info_count_); RtecScheduler::RT_Info* rt_info = 0; - for (RT_INFO_MAP::iterator info_iter (this->rt_info_map_); + for (ACE_TYPENAME RT_INFO_MAP::iterator info_iter (this->rt_info_map_); info_iter.done () == 0; ++info_iter) { @@ -705,7 +705,7 @@ compute_scheduling (CORBA::Long minimum_priority, } configs->length (this->config_info_count_); RtecScheduler::Config_Info* config_info = 0; - for (CONFIG_INFO_MAP::iterator config_iter (this->config_info_map_); + for (ACE_TYPENAME CONFIG_INFO_MAP::iterator config_iter (this->config_info_map_); config_iter.done () == 0; ++config_iter) { @@ -1182,46 +1182,6 @@ dfs_traverse_i (CORBA::Environment &ACE_TRY_ENV) } -// Helper function to compare the DFS finish times of -// two task entries, so qsort orders these in topological -// order, with the higher times *first* -template <class RECONFIG_SCHED_STRATEGY, class ACE_LOCK> int -TAO_Reconfig_Scheduler<RECONFIG_SCHED_STRATEGY, ACE_LOCK>:: -comp_entry_finish_times (const void *first, const void *second) -{ - const TAO_Reconfig_Scheduler_Entry *first_entry = - * ACE_reinterpret_cast (const TAO_Reconfig_Scheduler_Entry *const *, - first); - - const TAO_Reconfig_Scheduler_Entry *second_entry = - * ACE_reinterpret_cast (const TAO_Reconfig_Scheduler_Entry *const *, - second); - - // sort blank entries to the end - if (! first_entry) - { - return (second_entry) ? 1 : 0; - } - else if (! second_entry) - { - return -1; - } - - // Sort entries with higher forward DFS finishing times before those - // with lower forward DFS finishing times. - if (first_entry->fwd_finished () > - second_entry->fwd_finished ()) - { - return -1; - } - else if (first_entry->fwd_finished () < - second_entry->fwd_finished ()) - { - return 1; - } - - return 0; -} // Sorts an array of RT_info handles in topological order, then // checks for loops, marks unresolved remote dependencies. @@ -1239,7 +1199,7 @@ detect_cycles_i (CORBA::Environment &ACE_TRY_ENV) this->rt_info_count_, sizeof (TAO_Reconfig_Scheduler_Entry *), ACE_reinterpret_cast (COMP_FUNC, - TAO_Reconfig_Scheduler::comp_entry_finish_times)); + RECONFIG_SCHED_STRATEGY::comp_entry_finish_times)); // Traverse entries in reverse topological order, // looking for strongly connected components (cycles). @@ -1331,7 +1291,7 @@ assign_priorities_i (CORBA::Environment &ACE_TRY_ENV) } else { - ACE_THROW (RtecScheduler::UNKNOWN_TASK ()); + ACE_THROW (RtecScheduler::INTERNAL ()); } } diff --git a/TAO/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.h b/TAO/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.h index 72d36523840..7afa849927f 100644 --- a/TAO/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.h +++ b/TAO/orbsvcs/orbsvcs/Sched/Reconfig_Scheduler_T.h @@ -326,11 +326,6 @@ protected: // Traverses dependency graph, assigning a topological ordering. // Resets DFS map entries, do DFS traversal, constructs DFS map. - static int comp_entry_finish_times (const void *first, const void *second); - // Helper function to compare the DFS finish times of - // two task entries, so qsort orders these in topological - // order, with the higher times *first*. - virtual void detect_cycles_i (CORBA::Environment &_env) ACE_THROW_SPEC ((CORBA::SystemException, RtecScheduler::INTERNAL, |