summaryrefslogtreecommitdiff
path: root/ace/Sched_Params.i
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-10-12 05:37:01 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-10-12 05:37:01 +0000
commit06476381dbd90dff3e3f8aec87e128567b6ca414 (patch)
treec55c37ec4a45fcb51ec22be59ae2f316e0dbed44 /ace/Sched_Params.i
parente23d679495297feac86e1ef13b8c9e2187988a6d (diff)
downloadATCD-06476381dbd90dff3e3f8aec87e128567b6ca414.tar.gz
ChangeLogTag:Sun Oct 12 00:26:56 1997 Carlos O'Ryan <coryan@macarena.cs.wustl.edu>
Diffstat (limited to 'ace/Sched_Params.i')
-rw-r--r--ace/Sched_Params.i50
1 files changed, 50 insertions, 0 deletions
diff --git a/ace/Sched_Params.i b/ace/Sched_Params.i
index 08d4eb810b9..4008ccb5fe7 100644
--- a/ace/Sched_Params.i
+++ b/ace/Sched_Params.i
@@ -82,5 +82,55 @@ ACE_Sched_Params::quantum (const ACE_Time_Value &quant)
this->quantum_ = quant;
}
+ACE_INLINE
+ACE_Sched_Priority_Iterator::ACE_Sched_Priority_Iterator
+ (const ACE_Sched_Params::Policy& policy, int scope)
+ : policy_ (policy),
+ scope_ (scope)
+{
+ ACE_TRACE ("ACE_Sched_Priority_Iterator::ACE_Sched_Priority_Iterator");
+ priority_ = ACE_Sched_Params::priority_min (this->policy (), this->scope ());
+ this->done_ = 0;
+}
+
+ACE_INLINE
+int ACE_Sched_Priority_Iterator::more (void) const
+{
+ return !this->done_;
+}
+
+ACE_INLINE
+int ACE_Sched_Priority_Iterator::priority (void) const
+{
+ return this->priority_;
+}
+
+ACE_INLINE
+void ACE_Sched_Priority_Iterator::next (void)
+{
+ if (this->done_)
+ {
+ return;
+ }
+
+ int old_priority = this->priority_;
+ priority_ = ACE_Sched_Params::next_priority (this->policy (),
+ this->priority (),
+ this->scope ());
+ this->done_ = (old_priority == priority_);
+}
+
+ACE_INLINE
+const ACE_Sched_Params::Policy&
+ ACE_Sched_Priority_Iterator::policy (void) const
+{
+ return this->policy_;
+}
+
+ACE_INLINE
+int ACE_Sched_Priority_Iterator::scope (void) const
+{
+ return this->scope_;
+}
// EOF