Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / ACE / Kokyu / Dispatcher_Task.inl
blobf4d3aa62428036d3296cff41cb4399aeca0a4f27
1 namespace Kokyu
3 ACE_INLINE
4 Dispatcher_Task::Dispatcher_Task (const ConfigInfo& config_info,
5                                   ACE_Thread_Manager* thr_manager)
6   :  ACE_Task<ACE_SYNCH> (thr_manager),
7      curr_config_info_ (config_info),
8      allocator_ (config_info.allocator_),
9      own_allocator_ (0),
10      deadline_msg_strategy_ (config_info.reordering_flags_.static_bit_field_mask_,
11                              config_info.reordering_flags_.static_bit_field_shift_,
12                              config_info.reordering_flags_.dynamic_priority_max_,
13                              config_info.reordering_flags_.dynamic_priority_offset_),
14      laxity_msg_strategy_ (config_info.reordering_flags_.static_bit_field_mask_,
15                            config_info.reordering_flags_.static_bit_field_shift_,
16                            config_info.reordering_flags_.dynamic_priority_max_,
17                            config_info.reordering_flags_.dynamic_priority_offset_)
19    this->initialize();
22 ACE_INLINE
23 Dispatcher_Task::~Dispatcher_Task ()
25    if (own_allocator_)
26    {
27       delete allocator_;
28    }
31 ACE_INLINE
32 Priority_t
33 Dispatcher_Task::preemption_priority() const
35     return curr_config_info_.preemption_priority_;
39 ACE_INLINE
40 const ConfigInfo&
41 Dispatcher_Task::get_curr_config_info() const
43     return curr_config_info_;
46 ACE_INLINE
47 Dispatch_Queue_Item::Dispatch_Queue_Item (
48         const Dispatch_Command* cmd,
49         const QoSDescriptor& qos_info,
50         ACE_Data_Block *data_block,
51         int flags,
52         ACE_Allocator* mb_allocator)
53  : ACE_Message_Block (data_block,
54                       flags,
55                       mb_allocator),
56    command_ (cmd), qos_info_ (qos_info)
59    this->init_i (qos_info);
62 ACE_INLINE
63 Dispatch_Queue_Item::Dispatch_Queue_Item (
64         const Dispatch_Command* cmd,
65         const QoSDescriptor& qos_info,
66         ACE_Allocator* mb_allocator)
67  : ACE_Message_Block (mb_allocator),
68    command_ (cmd), qos_info_ (qos_info)
70    this->init_i (qos_info);
73 ACE_INLINE
74 Dispatch_Command*
75 Dispatch_Queue_Item::command()
77   return const_cast<Dispatch_Command*> (command_);