File: DSRT_Dispatcher_Impl_T.cpp

package info (click to toggle)
ace 6.0.3%2Bdfsg-0.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 49,368 kB
  • sloc: cpp: 341,826; perl: 30,850; ansic: 20,952; makefile: 10,144; sh: 4,744; python: 828; exp: 787; yacc: 511; xml: 330; lex: 158; lisp: 116; csh: 48; tcl: 5
file content (54 lines) | stat: -rw-r--r-- 1,613 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// $Id: DSRT_Dispatcher_Impl_T.cpp 91670 2010-09-08 18:02:26Z johnnyw $

#ifndef DSRT_DISPATCHER_IMPL_T_CPP
#define DSRT_DISPATCHER_IMPL_T_CPP

#include "DSRT_Dispatcher_Impl_T.h"

#if ! defined (__ACE_INLINE__)
#include "DSRT_Dispatcher_Impl_T.inl"
#endif /* __ACE_INLINE__ */

namespace Kokyu
{

template <class DSRT_Scheduler_Traits>
DSRT_Dispatcher_Impl<DSRT_Scheduler_Traits>::
DSRT_Dispatcher_Impl (ACE_Sched_Params::Policy sched_policy,
                          int sched_scope)
  : sched_policy_ (sched_policy),
    sched_scope_ (sched_scope),
    min_prio_ (ACE_Sched_Params::priority_min
               (sched_policy_,
                sched_scope)),
    max_prio_ (ACE_Sched_Params::priority_max
               (sched_policy_,
                sched_scope)),
    executive_prio_ (max_prio_),
    blocked_prio_ (ACE_Sched_Params::previous_priority
                   (sched_policy_,
                    max_prio_,
                    sched_scope)),
    inactive_prio_ (min_prio_),
    active_prio_ (ACE_Sched_Params::next_priority
                  (sched_policy_,
                   min_prio_)),
    shutdown_flagged_ (0),
    non_rt_thr_flags_ (THR_NEW_LWP | THR_JOINABLE | THR_BOUND),
    curr_scheduled_thr_handle_ (0)
{
  if (sched_policy_ == ACE_SCHED_FIFO)
    rt_thr_flags_ = non_rt_thr_flags_ | THR_SCHED_FIFO;
  else if (sched_policy_ == ACE_SCHED_RR)
    rt_thr_flags_ = non_rt_thr_flags_ | THR_SCHED_RR;
}

//virtual - so don't inline
template <class DSRT_Scheduler_Traits>
DSRT_Dispatcher_Impl<DSRT_Scheduler_Traits>::~DSRT_Dispatcher_Impl ()
{
}

}

#endif /* DSRT_DISPATCHER_IMPL_T_CPP */