Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / Sched_Params.inl
blob1aef3ec8466ff47ce5b751de7e9fdfa29f05bc74
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5  *  @file    Sched_Params.inl
6  *
7  *  @author David Levine
8  */
9 //=============================================================================
12 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
14 ACE_INLINE
15 ACE_Sched_Params::ACE_Sched_Params (
16       const Policy policy,
17       const ACE_Sched_Priority priority,
18       const int scope,
19       const ACE_Time_Value &quantum)
20   : policy_ (policy),
21     priority_ (priority),
22     scope_ (scope),
23     quantum_ (quantum)
27 ACE_INLINE ACE_Sched_Params::~ACE_Sched_Params ()
31 ACE_INLINE ACE_Sched_Params::Policy
32 ACE_Sched_Params::policy () const
34   return this->policy_;
37 ACE_INLINE void
38 ACE_Sched_Params::policy (const ACE_Sched_Params::Policy policy)
40   this->policy_ = policy;
43 ACE_INLINE ACE_Sched_Priority
44 ACE_Sched_Params::priority () const
46   return this->priority_;
49 ACE_INLINE void
50 ACE_Sched_Params::priority (const ACE_Sched_Priority priority)
52   this->priority_ = priority;
55 ACE_INLINE int
56 ACE_Sched_Params::scope () const
58   return this->scope_;
61 ACE_INLINE void
62 ACE_Sched_Params::scope (const int scope)
64   this->scope_ = scope;
67 ACE_INLINE const ACE_Time_Value &
68 ACE_Sched_Params::quantum () const
70   return this->quantum_;
73 ACE_INLINE void
74 ACE_Sched_Params::quantum (const ACE_Time_Value &quant)
76   this->quantum_ = quant;
79 ACE_INLINE const ACE_Sched_Params::Policy &
80 ACE_Sched_Priority_Iterator::policy () const
82   return this->policy_;
85 ACE_INLINE int
86 ACE_Sched_Priority_Iterator::scope () const
88   return this->scope_;
91 ACE_INLINE
92 ACE_Sched_Priority_Iterator::ACE_Sched_Priority_Iterator (const ACE_Sched_Params::Policy &policy,
93                                                           int scope)
94  : policy_ (policy),
95    scope_ (scope),
96    priority_ (0),
97    done_ (0)
99   priority_ = ACE_Sched_Params::priority_min (this->policy (), this->scope ());
102 ACE_INLINE
103 ACE_Sched_Priority_Iterator::~ACE_Sched_Priority_Iterator ()
107 ACE_INLINE int
108 ACE_Sched_Priority_Iterator::more () const
110   return !this->done_;
113 ACE_INLINE int
114 ACE_Sched_Priority_Iterator::priority () const
116   return this->priority_;
119 ACE_INLINE void
120 ACE_Sched_Priority_Iterator::next ()
122   if (this->done_)
123     return;
125   int old_priority = this->priority_;
126   priority_ = ACE_Sched_Params::next_priority (this->policy (),
127                                                this->priority (),
128                                                this->scope ());
129   this->done_ = old_priority == priority_;
132 ACE_END_VERSIONED_NAMESPACE_DECL