summaryrefslogtreecommitdiff
path: root/Kokyu/Dispatcher_Task.i
diff options
context:
space:
mode:
Diffstat (limited to 'Kokyu/Dispatcher_Task.i')
-rw-r--r--Kokyu/Dispatcher_Task.i33
1 files changed, 33 insertions, 0 deletions
diff --git a/Kokyu/Dispatcher_Task.i b/Kokyu/Dispatcher_Task.i
index e663509d86b..c67a2acdaf8 100644
--- a/Kokyu/Dispatcher_Task.i
+++ b/Kokyu/Dispatcher_Task.i
@@ -17,6 +17,11 @@ Dispatcher_Task::Dispatcher_Task (const ConfigInfo& config_info,
config_info.reordering_flags_.static_bit_field_shift_,
config_info.reordering_flags_.dynamic_priority_max_,
config_info.reordering_flags_.dynamic_priority_offset_)
+#ifdef KOKYU_HAS_RELEASE_GUARD
+ , releases_()
+ , deferrer_attr_()
+ , deferrer_()
+#endif //KOKYU_HAS_RELEASE_GUARD
{
this->initialize();
}
@@ -46,6 +51,26 @@ Dispatcher_Task::get_curr_config_info() const
}
ACE_INLINE
+int
+Dispatcher_Task::enqueue (Dispatch_Queue_Item *qitem)
+{
+#ifdef KOKYU_HAS_RELEASE_GUARD
+ //update release time
+ //TODO: want release time before or after enqueuing call?
+ ACE_Time_Value release = ACE_OS::gettimeofday();
+#endif //KOKYU_HAS_RELEASE_GUARD
+
+ this->putq (qitem);
+
+#ifdef KOKYU_HAS_RELEASE_GUARD
+ //if qos_info is not in map, this should add it
+ this->releases_.rebind(qitem->qos_info(),release.msec());
+#endif //KOKYU_HAS_RELEASE_GUARD
+
+ return 0;
+}
+
+ACE_INLINE
Dispatch_Queue_Item::Dispatch_Queue_Item (
const Dispatch_Command* cmd,
const QoSDescriptor& qos_info,
@@ -78,4 +103,12 @@ Dispatch_Queue_Item::command()
{
return const_cast<Dispatch_Command*> (command_);
}
+
+ACE_INLINE
+const QoSDescriptor&
+Dispatch_Queue_Item::qos_info() const
+{
+ return this->qos_info_;
}
+
+} //namespace Kokyu