summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryamuna <yamuna@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-06-17 13:46:05 +0000
committeryamuna <yamuna@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-06-17 13:46:05 +0000
commit6cd7e41e2922551ff31b560e0d46f37e5d90b4d7 (patch)
tree8f9821f4624e21ff302e733456bc8ec5cf325869
parent8f05df82a23ba85113a800df925f85fca31dada7 (diff)
downloadATCD-6cd7e41e2922551ff31b560e0d46f37e5d90b4d7.tar.gz
*** empty log message ***
-rw-r--r--TAO/examples/RTScheduling/fixed_priority_scheduler/FP_DT_Creator.cpp20
-rw-r--r--TAO/examples/RTScheduling/fixed_priority_scheduler/FP_DT_Creator.h10
-rw-r--r--TAO/examples/RTScheduling/fixed_priority_scheduler/FP_Scheduler.h43
3 files changed, 45 insertions, 28 deletions
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 4165859709d..152883b26d6 100644
--- a/TAO/examples/RTScheduling/fixed_priority_scheduler/FP_DT_Creator.cpp
+++ b/TAO/examples/RTScheduling/fixed_priority_scheduler/FP_DT_Creator.cpp
@@ -7,18 +7,26 @@
FP_DT_Creator::FP_DT_Creator (void)
{
DT_TEST::instance ()->dt_creator (this);
+
}
Thread_Task*
FP_DT_Creator::create_thr_task (int importance,
int start_time,
- int load)
+ int load,
+ int iter,
+ int dist,
+ char *job_name
+ ACE_ENV_ARG_DECL)
{
FP_Task* task;
ACE_NEW_RETURN (task,
FP_Task (importance,
start_time,
load,
+ iter,
+ dist,
+ job_name,
this),
0);
return task;
@@ -43,15 +51,21 @@ FP_DT_Creator::sched_param (int importance)
void
FP_DT_Creator::yield (int suspend_time,
- Thread_Task *)
+ Thread_Task*)
{
// ACE_DEBUG ((LM_DEBUG,
// "%d\n",
// suspend_time));
-
+
ACE_OS::sleep (suspend_time);
}
+int
+FP_DT_Creator::total_load (void)
+{
+ return BUFSIZ;
+}
+
ACE_STATIC_SVC_DEFINE(FP_DT_Creator,
ACE_TEXT ("FP_DT_Creator"),
ACE_SVC_OBJ_T,
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 b1f1d78f2b5..44e5e10495f 100644
--- a/TAO/examples/RTScheduling/fixed_priority_scheduler/FP_DT_Creator.h
+++ b/TAO/examples/RTScheduling/fixed_priority_scheduler/FP_DT_Creator.h
@@ -5,7 +5,7 @@
#include "../DT_Creator.h"
#include "fp_dt_creator_export.h"
-
+#include "../Task.h"
class FP_DT_Creator_Export FP_DT_Creator: public DT_Creator
{
@@ -17,10 +17,16 @@ public:
//virtual Task* task (void);
virtual Thread_Task* create_thr_task (int importance,
int start_time,
- int load);
+ int load,
+ int iter,
+ int dist,
+ char *job_name);
virtual void yield (int suspend_time,
Thread_Task* task);
+
+ virtual int total_load (void);
+
};
diff --git a/TAO/examples/RTScheduling/fixed_priority_scheduler/FP_Scheduler.h b/TAO/examples/RTScheduling/fixed_priority_scheduler/FP_Scheduler.h
index 11759fee394..05c3b126c98 100644
--- a/TAO/examples/RTScheduling/fixed_priority_scheduler/FP_Scheduler.h
+++ b/TAO/examples/RTScheduling/fixed_priority_scheduler/FP_Scheduler.h
@@ -4,7 +4,7 @@
#define FIXED_PRIORITY_SCHEDULER_H
#include "tao/RTScheduling/RTSchedulerC.h"
-#include "FP_SchedulingC.h"
+#include "../FP_SchedulingC.h"
class Segment_Sched_Param_Policy:
public FP_Scheduling::SegmentSchedulingParameterPolicy,
@@ -13,7 +13,7 @@ public FP_Scheduling::SegmentSchedulingParameterPolicy,
public:
virtual RTCORBA::Priority value (void)
ACE_THROW_SPEC ((CORBA::SystemException));
-
+
virtual void value (RTCORBA::Priority value)
ACE_THROW_SPEC ((CORBA::SystemException));
private:
@@ -25,12 +25,12 @@ public FP_Scheduling::FP_Scheduler,
public TAO_Local_RefCounted_Object
{
public:
-
+
Fixed_Priority_Scheduler (CORBA::ORB_ptr orb);
~Fixed_Priority_Scheduler (void);
- virtual FP_Scheduling::SegmentSchedulingParameterPolicy_ptr
+ virtual FP_Scheduling::SegmentSchedulingParameterPolicy_ptr
create_segment_scheduling_parameter (RTCORBA::Priority segment_priority)
ACE_THROW_SPEC ((CORBA::SystemException));
@@ -41,15 +41,15 @@ public TAO_Local_RefCounted_Object
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE));
-
+
virtual void begin_nested_scheduling_segment (const RTScheduling::Current::IdType & guid,
const char * name,
CORBA::Policy_ptr sched_param,
CORBA::Policy_ptr implicit_sched_param
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
- ACE_THROW_SPEC ((CORBA::SystemException,
+ ACE_THROW_SPEC ((CORBA::SystemException,
RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE));
-
+
virtual void update_scheduling_segment (const RTScheduling::Current::IdType & guid,
const char * name,
CORBA::Policy_ptr sched_param,
@@ -57,12 +57,12 @@ public TAO_Local_RefCounted_Object
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE));
-
+
virtual void end_scheduling_segment (const RTScheduling::Current::IdType & guid,
const char * name
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
-
+
virtual void end_nested_scheduling_segment (const RTScheduling::Current::IdType & guid,
const char * name,
CORBA::Policy_ptr outer_sched_param
@@ -82,7 +82,7 @@ public TAO_Local_RefCounted_Object
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest));
-
+
virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
@@ -91,48 +91,48 @@ public TAO_Local_RefCounted_Object
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest));
-
+
virtual void send_other (PortableInterceptor::ServerRequestInfo_ptr ri
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest));
-
+
virtual void receive_reply (PortableInterceptor::ClientRequestInfo_ptr ri
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
-
+
virtual void receive_exception (PortableInterceptor::ClientRequestInfo_ptr ri
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest));
-
+
virtual void receive_other (PortableInterceptor::ClientRequestInfo_ptr ri
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest));
-
+
virtual void cancel (const RTScheduling::Current::IdType & guid
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
virtual CORBA::PolicyList * scheduling_policies (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
-
+
virtual void scheduling_policies (const CORBA::PolicyList & scheduling_policies
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
-
+
virtual CORBA::PolicyList * poa_policies (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
-
+
virtual char * scheduling_discipline_name (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
-
+
virtual RTScheduling::ResourceManager_ptr create_resource_manager (const char * name,
CORBA::Policy_ptr scheduling_parameter
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC ((CORBA::SystemException));
-
+
virtual void set_scheduling_parameter (PortableServer::Servant & resource,
const char * name,
CORBA::Policy_ptr scheduling_parameter
@@ -146,6 +146,3 @@ public TAO_Local_RefCounted_Object
};
#endif //FIXED_PRIORITY_SCHEDULER_H
-
-
-