Merge pull request #2237 from DOCGroup/jwillemsen-patch-2-1
[ACE_TAO.git] / ACE / Kokyu / Kokyu_defs.cpp
blobe474da88d0bc32bc7b06316fb91769d5461c0453
1 #include "Kokyu_defs.h"
3 #if ! defined (__ACE_INLINE__)
4 #include "Kokyu_defs.inl"
5 #endif /* __ACE_INLINE__ */
7 namespace Kokyu
9 Dispatch_Command::~Dispatch_Command ()
13 DSRT_ConfigInfo::DSRT_ConfigInfo ()
14 :sched_policy_ (ACE_SCHED_RR),
15 sched_scope_ (ACE_SCOPE_THREAD)
19 Dispatcher_Attributes::Dispatcher_Attributes()
20 :immediate_activation_ (0),
21 sched_policy_ (ACE_SCHED_FIFO),
22 sched_scope_ (ACE_SCOPE_THREAD),
23 base_thread_creation_flags_ (THR_NEW_LWP | THR_BOUND | THR_JOINABLE)
27 int Dispatcher_Attributes::thread_creation_flags () const
29 int thread_creation_flags = base_thread_creation_flags_;
31 switch (sched_policy_)
33 case ACE_SCHED_FIFO:
34 thread_creation_flags |= THR_SCHED_FIFO;
35 break;
37 case ACE_SCHED_OTHER:
38 thread_creation_flags |= THR_SCHED_DEFAULT;
39 break;
41 case ACE_SCHED_RR:
42 thread_creation_flags |= THR_SCHED_RR;
43 break;
46 switch (sched_scope_)
48 case ACE_SCOPE_PROCESS:
49 case ACE_SCOPE_LWP:
50 thread_creation_flags |= THR_SCOPE_PROCESS;
51 break;
53 case ACE_SCOPE_THREAD:
54 default:
55 thread_creation_flags |= THR_SCOPE_SYSTEM;
56 break;
58 return thread_creation_flags;