3 * @file DSRT_Dispatch_Item_T.h
5 * @author Venkita Subramonian (venkita@cs.wustl.edu)
8 #ifndef DSRT_DISPATCH_ITEM_H
9 #define DSRT_DISPATCH_ITEM_H
10 #include /**/ "ace/pre.h"
11 #include "ace/Bound_Ptr.h"
12 #include "ace/Copy_Disabled.h"
14 #if !defined (ACE_LACKS_PRAGMA_ONCE)
16 #endif /* ACE_LACKS_PRAGMA_ONCE */
18 #include "Kokyu_dsrt.h"
23 * @class DSRT_Dispatch_Item
25 * @brief This stores information about a schedulable thread.
28 template <class DSRT_Scheduler_Traits
>
29 class DSRT_Dispatch_Item
: private ACE_Copy_Disabled
32 DSRT_Scheduler_Traits::Guid_t Guid_t
;
35 DSRT_Scheduler_Traits::QoSDescriptor_t DSRT_QoSDescriptor
;
38 ACE_hthread_t thr_handle_
;
40 DSRT_QoSDescriptor qos_
;
41 ACE_Time_Value insertion_time_
;
44 DSRT_Dispatch_Item (Guid_t guid
, const DSRT_QoSDescriptor
&);
49 /// Get the associated qos value.
50 DSRT_QoSDescriptor
qos ();
52 /// Get the thread handle.
53 ACE_hthread_t
thread_handle ();
55 /// Set the thread handle.
56 void thread_handle (ACE_hthread_t
&handle
);
58 /// Get the insertion time.
59 ACE_Time_Value
insertion_time ();
61 /// Set the insertion time.
62 void insertion_time (const ACE_Time_Value
&);
66 * @class DSRT_Dispatch_Item_var
68 * @brief Smart pointer to dynamically allocated <code>
69 * DSRT_Dispatch_Item </code> objects.
71 template <class DSRT_Scheduler_Traits
>
72 class DSRT_Dispatch_Item_var
:
73 public ACE_Strong_Bound_Ptr
<
74 DSRT_Dispatch_Item
<DSRT_Scheduler_Traits
>,
79 DSRT_Dispatch_Item_var (DSRT_Dispatch_Item
<DSRT_Scheduler_Traits
>
82 DSRT_Dispatch_Item_var (
83 const DSRT_Dispatch_Item_var
<DSRT_Scheduler_Traits
> &r
);
87 #if defined (__ACE_INLINE__)
88 #include "DSRT_Dispatch_Item_T.inl"
89 #endif /* __ACE_INLINE__ */
91 #include "DSRT_Dispatch_Item_T.cpp"
93 #include /**/ "ace/post.h"
94 #endif /* DSRT_DISPATCH_ITEM_H */