4 #include "POA_Holder.h"
7 #include "rtschedtestlib_export.h"
9 #include "tao/RTScheduling/RTScheduler.h"
10 #include "orbsvcs/CosNamingC.h"
12 #include "ace/Service_Config.h"
13 #include "ace/Service_Object.h"
14 #include "ace/Arg_Shifter.h"
15 #include "ace/High_Res_Timer.h"
20 typedef Thread_Task
**DT_LIST
;
21 typedef POA_Holder
**POA_LIST
;
22 typedef Job_i
**JOB_LIST
;
24 class RTSCHEDTESTLIB_Export DT_Creator
: public ACE_Service_Object
29 virtual ~DT_Creator (void);
31 int init (int argc
, ACE_TCHAR
*argv
[]);
33 int dt_task_init (ACE_Arg_Shifter
& arg_shifter
);
35 virtual void create_distributable_threads (RTScheduling::Current_ptr current
);
37 void activate_poa_list (void);
38 void activate_job_list (void);
39 void activate_schedule (void);
41 virtual void yield (time_t suspend_time
,
42 Thread_Task
* task
) = 0;
44 virtual void wait (void) = 0;
46 virtual CORBA::Policy_ptr
sched_param (int importance
) = 0;
48 virtual Thread_Task
* create_thr_task (int importance
,
54 // virtual Task* task (void) = 0;
56 /// Resolve the naming service.
57 int resolve_naming_service (void);
62 void job_ended (void);
64 void check_ifexit (void);
66 void log_msg (char* msg
);
68 void orb (CORBA::ORB_ptr
);
69 CORBA::ORB_ptr
orb (void);
71 ACE_Time_Value
* base_time (void);
72 void base_time (ACE_Time_Value
*);
74 ACE_hrtime_t
base_hr_time (void);
76 virtual int total_load (void) = 0;
78 Synch_i
* synch (void);
80 void register_synch_obj (void);
82 int activate_root_poa (void);
90 //Fixed_Priority_Scheduler* scheduler_;
95 /// Mutex to serialize access to our internal state.
96 ACE_Lock
* state_lock_
;
97 ACE_Lock
* shutdown_lock_
;
99 int active_job_count_
;
101 ACE_Time_Value
* base_time_
;
102 /// A naming context.
103 CosNaming::NamingContextExt_var naming_
;
104 ACE_TString file_name_
;
105 ACE_TString log_file_name_
;
106 ACE_High_Res_Timer::global_scale_factor_type gsf_
;
107 PortableServer::Servant_var
<Synch_i
> synch_
;
111 #endif /*DT_CREATOR_H*/