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