00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00022
00023 ACE_INLINE
00024 ACE_Sched_Params::ACE_Sched_Params (
00025 const Policy policy,
00026 const ACE_Sched_Priority priority,
00027 const int scope,
00028 const ACE_Time_Value &quantum)
00029 : policy_ (policy),
00030 priority_ (priority),
00031 scope_ (scope),
00032 quantum_ (quantum)
00033 {
00034 }
00035
00036 ACE_INLINE ACE_Sched_Params::~ACE_Sched_Params (void)
00037 {
00038 }
00039
00040 ACE_INLINE ACE_Sched_Params::Policy
00041 ACE_Sched_Params::policy (void) const
00042 {
00043 return this->policy_;
00044 }
00045
00046 ACE_INLINE void
00047 ACE_Sched_Params::policy (const ACE_Sched_Params::Policy policy)
00048 {
00049 this->policy_ = policy;
00050 }
00051
00052 ACE_INLINE ACE_Sched_Priority
00053 ACE_Sched_Params::priority (void) const
00054 {
00055 return this->priority_;
00056 }
00057
00058 ACE_INLINE void
00059 ACE_Sched_Params::priority (const ACE_Sched_Priority priority)
00060 {
00061 this->priority_ = priority;
00062 }
00063
00064 ACE_INLINE int
00065 ACE_Sched_Params::scope (void) const
00066 {
00067 return this->scope_;
00068 }
00069
00070 ACE_INLINE void
00071 ACE_Sched_Params::scope (const int scope)
00072 {
00073 this->scope_ = scope;
00074 }
00075
00076 ACE_INLINE const ACE_Time_Value &
00077 ACE_Sched_Params::quantum (void) const
00078 {
00079 return this->quantum_;
00080 }
00081
00082 ACE_INLINE void
00083 ACE_Sched_Params::quantum (const ACE_Time_Value &quant)
00084 {
00085 this->quantum_ = quant;
00086 }
00087
00088 ACE_INLINE const ACE_Sched_Params::Policy &
00089 ACE_Sched_Priority_Iterator::policy (void) const
00090 {
00091 return this->policy_;
00092 }
00093
00094 ACE_INLINE int
00095 ACE_Sched_Priority_Iterator::scope (void) const
00096 {
00097 return this->scope_;
00098 }
00099
00100 ACE_INLINE
00101 ACE_Sched_Priority_Iterator::ACE_Sched_Priority_Iterator (const ACE_Sched_Params::Policy &policy,
00102 int scope)
00103 : policy_ (policy),
00104 scope_ (scope),
00105 priority_ (0),
00106 done_ (0)
00107 {
00108 priority_ = ACE_Sched_Params::priority_min (this->policy (), this->scope ());
00109 }
00110
00111 ACE_INLINE
00112 ACE_Sched_Priority_Iterator::~ACE_Sched_Priority_Iterator (void)
00113 {
00114 }
00115
00116 ACE_INLINE int
00117 ACE_Sched_Priority_Iterator::more (void) const
00118 {
00119 return !this->done_;
00120 }
00121
00122 ACE_INLINE int
00123 ACE_Sched_Priority_Iterator::priority (void) const
00124 {
00125 return this->priority_;
00126 }
00127
00128 ACE_INLINE void
00129 ACE_Sched_Priority_Iterator::next (void)
00130 {
00131 if (this->done_)
00132 return;
00133
00134 int old_priority = this->priority_;
00135 priority_ = ACE_Sched_Params::next_priority (this->policy (),
00136 this->priority (),
00137 this->scope ());
00138 this->done_ = old_priority == priority_;
00139 }
00140
00141 ACE_END_VERSIONED_NAMESPACE_DECL