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 ();
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 ();
38 void activate_job_list ();
39 void activate_schedule ();
41 virtual void yield (time_t suspend_time
,
42 Thread_Task
* task
) = 0;
44 virtual void wait () = 0;
46 virtual CORBA::Policy_ptr
sched_param (int importance
) = 0;
48 virtual Thread_Task
* create_thr_task (int importance
,
54 // virtual Task* task () = 0;
56 /// Resolve the naming service.
57 int resolve_naming_service ();
66 void log_msg (char* msg
);
68 void orb (CORBA::ORB_ptr
);
69 CORBA::ORB_ptr
orb ();
71 ACE_Time_Value
* base_time ();
72 void base_time (ACE_Time_Value
*);
74 ACE_hrtime_t
base_hr_time ();
76 virtual int total_load () = 0;
80 void register_synch_obj ();
82 int activate_root_poa ();
88 //Fixed_Priority_Scheduler* scheduler_;
93 /// Mutex to serialize access to our internal state.
94 ACE_Lock
* state_lock_
;
95 ACE_Lock
* shutdown_lock_
;
97 int active_job_count_
;
99 ACE_Time_Value
* base_time_
;
100 /// A naming context.
101 CosNaming::NamingContextExt_var naming_
;
102 ACE_TString file_name_
;
103 ACE_TString log_file_name_
;
104 ACE_High_Res_Timer::global_scale_factor_type gsf_
;
105 PortableServer::Servant_var
<Synch_i
> synch_
;
109 #endif /*DT_CREATOR_H*/