3 * @file DSRT_Direct_Dispatcher_Impl_T.h
5 * @author Venkita Subramonian (venkita@cs.wustl.edu)
8 #ifndef DSRT_DIRECT_DISPATCHER_IMPL_T_H
9 #define DSRT_DIRECT_DISPATCHER_IMPL_T_H
10 #include /**/ "ace/pre.h"
15 #if !defined (ACE_LACKS_PRAGMA_ONCE)
17 #endif /* ACE_LACKS_PRAGMA_ONCE */
18 #include "ace/Copy_Disabled.h"
19 #include "Kokyu_dsrt.h"
20 #include "DSRT_Sched_Queue_T.h"
21 #include "DSRT_Dispatcher_Impl_T.h"
25 template<class DSRT_Scheduler_Traits
>
26 class DSRT_Direct_Dispatcher_Impl
:
28 public DSRT_Dispatcher_Impl
<DSRT_Scheduler_Traits
>,
29 public ACE_Copy_Disabled
33 DSRT_Scheduler_Traits::Guid_t Guid_t
;
36 DSRT_Scheduler_Traits::QoSDescriptor_t DSRT_QoSDescriptor
;
38 DSRT_Direct_Dispatcher_Impl (ACE_Sched_Params::Policy sched_policy
,
41 int init_i (const DSRT_ConfigInfo
&);
43 /// Schedule a thread dynamically based on the qos info supplied.
44 int schedule_i (Guid_t
, const DSRT_QoSDescriptor
&);
46 /// Update the schedule for a thread. This could alter the current
48 int update_schedule_i (Guid_t
, const DSRT_QoSDescriptor
&);
50 /// Inform the scheduler that the caller thread is about to
51 /// block. This could alter the current schedule.
52 int update_schedule_i (Guid_t
, Block_Flag_t
);
54 /// Cancel the schedule for a thread. This could alter the current
56 int cancel_schedule_i (Guid_t
);
58 /// Shut down the dispatcher. The dispatcher will stop processing
63 typedef ACE_SYNCH_MUTEX cond_lock_t
;
64 typedef ACE_SYNCH_CONDITION cond_t
;
66 u_int sched_queue_modified_
;
67 cond_lock_t sched_queue_modified_cond_lock_
;
68 cond_t sched_queue_modified_cond_
;
75 #include "DSRT_Direct_Dispatcher_Impl_T.cpp"
77 #include /**/ "ace/post.h"
78 #endif /* DSRT_DIRECT_DISPATCHER_IMPL_T_H */