1 #include "MIF_DT_Creator.h"
5 MIF_DT_Creator::MIF_DT_Creator (void)
7 DT_TEST::instance ()->dt_creator (this);
11 MIF_DT_Creator::create_thr_task (int importance
,
32 MIF_DT_Creator::sched_param (int importance
)
34 return DT_TEST::instance ()->scheduler ()->create_segment_scheduling_parameter (importance
);
38 MIF_DT_Creator::yield (time_t suspend_time
,
43 CORBA::Object_var object
=
44 this->orb_
->resolve_initial_references ("RTScheduler_Current");
45 RTScheduling::Current_var current
=
46 RTScheduling::Current::_narrow (object
.in ());
48 ACE_Time_Value
const sus_time_value (suspend_time
);
49 ACE_Time_Value
now (ACE_OS::gettimeofday ());
50 while (((now
- *base_time_
) < sus_time_value
) || (suspend_time
== 1))
54 CORBA::Policy_var sched_param
;
55 sched_param
= this->sched_param (100);
56 const char * name
= 0;
57 current
->update_scheduling_segment (name
,
60 now
= ACE_OS::gettimeofday ();
61 if (suspend_time
== 1)
65 catch (const CORBA::Exception
& ex
)
67 ex
._tao_print_exception ("Caught exception:");
72 MIF_DT_Creator::total_load (void)
78 MIF_DT_Creator::wait (void)
80 while (active_dt_count_
> 0 || active_job_count_
> 0)
84 (void)this->orb_
->work_pending ();
86 catch (const CORBA::BAD_INV_ORDER
&)
88 // If there is BAD_INV_ORDER exception there is
89 // no point in running this loop any more.
96 ACE_STATIC_SVC_DEFINE(MIF_DT_Creator
,
97 ACE_TEXT ("MIF_DT_Creator"),
99 &ACE_SVC_NAME (MIF_DT_Creator
),
100 ACE_Service_Type::DELETE_THIS
| ACE_Service_Type::DELETE_OBJ
,
103 ACE_FACTORY_DEFINE (ACE_Local_Service
, MIF_DT_Creator
)