diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2008-06-18 14:46:20 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2008-06-18 14:46:20 +0000 |
commit | 04168746047b1eabaf76fc0824c0d4b8928b766a (patch) | |
tree | c51271e0e7d7c19a3ea77f3fa42a95c2ce7fe263 | |
parent | aa525bbcfa9eaae28fe2490fa8f3e58ccbda9e3c (diff) | |
download | ATCD-04168746047b1eabaf76fc0824c0d4b8928b766a.tar.gz |
ChangeLogTag: Wed Jun 18 14:48:56 UTC 2008 Chad Elliott <elliott_c@ociweb.com>
13 files changed, 47 insertions, 37 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 012e8734a39..cb45813c961 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,20 @@ +Wed Jun 18 14:48:56 UTC 2008 Chad Elliott <elliott_c@ociweb.com> + + * examples/RTScheduling/DT_Creator.h: + * examples/RTScheduling/DT_Creator.cpp: + * examples/RTScheduling/Fixed_Priority_Scheduler/FP_DT_Creator.h: + * examples/RTScheduling/Fixed_Priority_Scheduler/FP_DT_Creator.cpp: + * examples/RTScheduling/Fixed_Priority_Scheduler/FP_Task.h: + * examples/RTScheduling/Fixed_Priority_Scheduler/FP_Task.cpp: + * examples/RTScheduling/MIF_Scheduler/MIF_DT_Creator.h: + * examples/RTScheduling/MIF_Scheduler/MIF_DT_Creator.cpp: + * examples/RTScheduling/MIF_Scheduler/MIF_Task.h: + * examples/RTScheduling/MIF_Scheduler/MIF_Task.cpp: + * examples/RTScheduling/Thread_Task.h: + * examples/RTScheduling/Thread_Task.cpp: + + Use time_t where time is concerned to avoid so many casts to int. + Wed Jun 18 14:40:00 UTC 2008 Simon Massey <sma at prismtech dot com> * orbsvcs/orbsvcs/LoadBalancing/LB_IORInterceptor.cpp: diff --git a/TAO/examples/RTScheduling/DT_Creator.cpp b/TAO/examples/RTScheduling/DT_Creator.cpp index 9241e477057..b42b608c014 100644 --- a/TAO/examples/RTScheduling/DT_Creator.cpp +++ b/TAO/examples/RTScheduling/DT_Creator.cpp @@ -16,7 +16,7 @@ int DT_Creator::dt_task_init (ACE_Arg_Shifter& arg_shifter) { static int dt_index = 0; - int start_time = 0; + time_t start_time = 0; int load = 0; int iter = 0; int importance = 0; @@ -464,14 +464,12 @@ DT_Creator::create_distributable_threads (RTScheduling::Current_ptr current) ACE_Thread::self (curr_thr); if (dt_list_ [i]->start_time () != 0 && - (elapsed_time.sec () < static_cast<time_t> (dt_list_[i]->start_time ()))) + (elapsed_time.sec () < dt_list_[i]->start_time ())) { - int suspension_time = dt_list_[i]->start_time () - elapsed_time.sec (); - ACE_OS::sprintf (buf,"suspension_tome = %d\n", - suspension_time); + time_t suspension_time = dt_list_[i]->start_time () - elapsed_time.sec (); + ACE_OS::sprintf (buf, "suspension_tome = %lu\n", suspension_time); log [log_index++] = ACE_OS::strdup (buf); - yield (suspension_time, - dt_list_[i]); + yield (suspension_time, dt_list_[i]); } sched_param = CORBA::Policy::_duplicate (this->sched_param (dt_list_ [i]->importance ())); diff --git a/TAO/examples/RTScheduling/DT_Creator.h b/TAO/examples/RTScheduling/DT_Creator.h index b2ffcea1670..4f706d95109 100644 --- a/TAO/examples/RTScheduling/DT_Creator.h +++ b/TAO/examples/RTScheduling/DT_Creator.h @@ -39,15 +39,15 @@ class RTSCHEDTESTLIB_Export DT_Creator : public ACE_Service_Object void activate_job_list (void); void activate_schedule (void); - virtual void yield (int suspend_time, - Thread_Task* task) = 0; + virtual void yield (time_t suspend_time, + Thread_Task* task) = 0; virtual void wait (void) = 0; virtual CORBA::Policy_ptr sched_param (int importance) = 0; virtual Thread_Task* create_thr_task (int importance, - int start_time, + time_t start_time, int load, int iter, int dist, diff --git a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_DT_Creator.cpp b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_DT_Creator.cpp index b6dfd750067..71a7d1c25d0 100644 --- a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_DT_Creator.cpp +++ b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_DT_Creator.cpp @@ -12,7 +12,7 @@ FP_DT_Creator::FP_DT_Creator (void) Thread_Task* FP_DT_Creator::create_thr_task (int importance, - int start_time, + time_t start_time, int load, int iter, int dist, @@ -41,10 +41,10 @@ FP_DT_Creator::sched_param (int importance) void -FP_DT_Creator::yield (int suspend_time, - Thread_Task*) +FP_DT_Creator::yield (time_t suspend_time, + Thread_Task*) { - ACE_OS::sleep (suspend_time); + ACE_OS::sleep (static_cast<u_int> (suspend_time)); } int diff --git a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_DT_Creator.h b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_DT_Creator.h index 8bbb5376d50..357ac34457f 100644 --- a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_DT_Creator.h +++ b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_DT_Creator.h @@ -15,13 +15,13 @@ public: //virtual Task* task (void); virtual Thread_Task* create_thr_task (int importance, - int start_time, + time_t start_time, int load, int iter, int dist, char *job_name); - virtual void yield (int suspend_time, + virtual void yield (time_t suspend_time, Thread_Task* task); virtual void wait (void); diff --git a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Task.cpp b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Task.cpp index 9050e58d3e2..ec80d1fd20f 100644 --- a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Task.cpp +++ b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Task.cpp @@ -8,7 +8,7 @@ #include "ace/Countdown_Time.h" FP_Task::FP_Task (int importance, - int start_time, + time_t start_time, int load, int iter, int dist, diff --git a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Task.h b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Task.h index e2c0acb960a..8e5494f8448 100644 --- a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Task.h +++ b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Task.h @@ -8,7 +8,7 @@ class FP_Task : public Thread_Task { public: FP_Task (int importance, - int start_time, + time_t start_time, int load, int iter, int dist, diff --git a/TAO/examples/RTScheduling/MIF_Scheduler/MIF_DT_Creator.cpp b/TAO/examples/RTScheduling/MIF_Scheduler/MIF_DT_Creator.cpp index a11ecf97ff3..fd822063210 100644 --- a/TAO/examples/RTScheduling/MIF_Scheduler/MIF_DT_Creator.cpp +++ b/TAO/examples/RTScheduling/MIF_Scheduler/MIF_DT_Creator.cpp @@ -11,7 +11,7 @@ MIF_DT_Creator::MIF_DT_Creator (void) Thread_Task* MIF_DT_Creator::create_thr_task (int importance, - int start_time, + time_t start_time, int load, int iter, int dist, @@ -37,7 +37,7 @@ MIF_DT_Creator::sched_param (int importance) } void -MIF_DT_Creator::yield (int suspend_time, +MIF_DT_Creator::yield (time_t suspend_time, Thread_Task*) { try diff --git a/TAO/examples/RTScheduling/MIF_Scheduler/MIF_DT_Creator.h b/TAO/examples/RTScheduling/MIF_Scheduler/MIF_DT_Creator.h index e23525a6a4d..4404293c69b 100644 --- a/TAO/examples/RTScheduling/MIF_Scheduler/MIF_DT_Creator.h +++ b/TAO/examples/RTScheduling/MIF_Scheduler/MIF_DT_Creator.h @@ -15,13 +15,13 @@ public: //virtual Task* task (void); virtual Thread_Task* create_thr_task (int importance, - int start_time, + time_t start_time, int load, int iter, int dist, char *job_name); - virtual void yield (int suspend_time, + virtual void yield (time_t suspend_time, Thread_Task* task); virtual void wait (void); diff --git a/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Task.cpp b/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Task.cpp index acbbb2b6caf..c19d7db0486 100644 --- a/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Task.cpp +++ b/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Task.cpp @@ -7,12 +7,12 @@ #include "ace/Countdown_Time.h" MIF_Task::MIF_Task (int importance, - int start_time, - int load, - int iter, - int dist, - char *job_name, - DT_Creator *dt_creator) + time_t start_time, + int load, + int iter, + int dist, + char *job_name, + DT_Creator *dt_creator) { this->load_ = load; this->iter_ = iter; diff --git a/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Task.h b/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Task.h index be24061fb11..62ac087f5d6 100644 --- a/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Task.h +++ b/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Task.h @@ -8,7 +8,7 @@ class MIF_Task : public Thread_Task { public: MIF_Task (int importance, - int start_time, + time_t start_time, int load, int iter, int dist, diff --git a/TAO/examples/RTScheduling/Thread_Task.cpp b/TAO/examples/RTScheduling/Thread_Task.cpp index 22abb129d88..aa1be1b9caa 100644 --- a/TAO/examples/RTScheduling/Thread_Task.cpp +++ b/TAO/examples/RTScheduling/Thread_Task.cpp @@ -74,7 +74,7 @@ Thread_Task::importance (void) return this->importance_; } -int +time_t Thread_Task::start_time (void) { return this->start_time_; diff --git a/TAO/examples/RTScheduling/Thread_Task.h b/TAO/examples/RTScheduling/Thread_Task.h index ace9e6a8880..f88093ee6cc 100644 --- a/TAO/examples/RTScheduling/Thread_Task.h +++ b/TAO/examples/RTScheduling/Thread_Task.h @@ -15,11 +15,6 @@ class RTSCHEDTESTLIB_Export Thread_Task : public ACE_Task <ACE_SYNCH> { public: -/* Thread_Task (int importance, */ -/* int start_time, */ -/* int load, */ -/* DT_Creator *dt_creator); */ - Thread_Task (void); virtual int activate_task (RTScheduling::Current_ptr current, @@ -31,7 +26,7 @@ class RTSCHEDTESTLIB_Export Thread_Task : public ACE_Task <ACE_SYNCH> int importance (void); - int start_time (void); + time_t start_time (void); /// = Job get/set /// Returns the name of the Job exec'ed by this Task. @@ -49,7 +44,7 @@ class RTSCHEDTESTLIB_Export Thread_Task : public ACE_Task <ACE_SYNCH> virtual int svc (void); RTScheduling::Current_var current_; CORBA::Policy_var sched_param_; - int start_time_; + time_t start_time_; int load_; int iter_; size_t count_; |