Compile fixes
[ACE_TAO.git] / ACE / Kokyu / DSRT_Direct_Dispatcher_Impl_T.h
blobb7aa5d00e7093dc55905894bc41e22b7ccf18117
1 /* -*- C++ -*- */
2 /**
3 * @file DSRT_Direct_Dispatcher_Impl_T.h
5 * @author Venkita Subramonian (venkita@cs.wustl.edu)
6 */
8 #ifndef DSRT_DIRECT_DISPATCHER_IMPL_T_H
9 #define DSRT_DIRECT_DISPATCHER_IMPL_T_H
10 #include /**/ "ace/pre.h"
12 #include "ace/Task.h"
15 #if !defined (ACE_LACKS_PRAGMA_ONCE)
16 # 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"
23 namespace Kokyu
25 template<class DSRT_Scheduler_Traits>
26 class DSRT_Direct_Dispatcher_Impl :
27 public ACE_Task_Base,
28 public DSRT_Dispatcher_Impl<DSRT_Scheduler_Traits>,
29 public ACE_Copy_Disabled
31 public:
32 typedef typename
33 DSRT_Scheduler_Traits::Guid_t Guid_t;
35 typedef typename
36 DSRT_Scheduler_Traits::QoSDescriptor_t DSRT_QoSDescriptor;
38 DSRT_Direct_Dispatcher_Impl (ACE_Sched_Params::Policy sched_policy,
39 int sched_scope);
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
47 /// schedule.
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
55 /// schedule.
56 int cancel_schedule_i (Guid_t);
58 /// Shut down the dispatcher. The dispatcher will stop processing
59 /// requests.
60 int shutdown_i ();
62 private:
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_;
70 private:
71 int svc ();
75 #include "DSRT_Direct_Dispatcher_Impl_T.cpp"
77 #include /**/ "ace/post.h"
78 #endif /* DSRT_DIRECT_DISPATCHER_IMPL_T_H */