summaryrefslogtreecommitdiff
path: root/Kokyu
diff options
context:
space:
mode:
authorvenkita <venkita@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-10-14 08:53:07 +0000
committervenkita <venkita@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-10-14 08:53:07 +0000
commitfec855474ab588f72b6aafc88aa6d26c0824f7de (patch)
tree3f76bdba0b4642fc9af2171a01acd8b8f1902130 /Kokyu
parent91cc1ffb8d303588b382bbe1df74bf7fc8596d58 (diff)
downloadATCD-fec855474ab588f72b6aafc88aa6d26c0824f7de.tar.gz
ChangeLogTag: Tue Oct 14 03:43:47 2003 Venkita Subramonian <venkita@cs.wustl.edu>
Diffstat (limited to 'Kokyu')
-rw-r--r--Kokyu/DSRT_CV_Dispatcher_Impl_T.cpp4
-rw-r--r--Kokyu/DSRT_Direct_Dispatcher_Impl_T.cpp6
-rw-r--r--Kokyu/Default_Dispatcher_Impl.cpp7
-rw-r--r--Kokyu/Dispatcher_Task.cpp1
-rw-r--r--Kokyu/Dispatcher_Task.h1
-rw-r--r--Kokyu/Kokyu.h8
-rw-r--r--Kokyu/Kokyu_defs.i4
7 files changed, 22 insertions, 9 deletions
diff --git a/Kokyu/DSRT_CV_Dispatcher_Impl_T.cpp b/Kokyu/DSRT_CV_Dispatcher_Impl_T.cpp
index 737ec3e105b..a5d28115fac 100644
--- a/Kokyu/DSRT_CV_Dispatcher_Impl_T.cpp
+++ b/Kokyu/DSRT_CV_Dispatcher_Impl_T.cpp
@@ -73,9 +73,9 @@ schedule_i (Guid_t id, const DSRT_QoSDescriptor& qos)
this->blocked_prio_,
this->sched_policy_) == -1)
{
- ACE_ERROR ((LM_ERROR,
+ ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("%p\n"),
- ACE_TEXT ("thr_setprio failed")));
+ ACE_TEXT ("thr_setprio failed")), -1);
}
ACE_NEW_RETURN (item,
diff --git a/Kokyu/DSRT_Direct_Dispatcher_Impl_T.cpp b/Kokyu/DSRT_Direct_Dispatcher_Impl_T.cpp
index 2d3c996a23d..20f61222b11 100644
--- a/Kokyu/DSRT_Direct_Dispatcher_Impl_T.cpp
+++ b/Kokyu/DSRT_Direct_Dispatcher_Impl_T.cpp
@@ -188,7 +188,7 @@ template <class DSRT_Scheduler_Traits>
int DSRT_Direct_Dispatcher_Impl<DSRT_Scheduler_Traits>::
schedule_i (Guid_t id, const DSRT_QoSDescriptor& qos)
{
- ACE_GUARD_RETURN (ACE_SYNCH_RECURSIVE_MUTEX, guard, synch_lock_, -1);
+ ACE_GUARD_RETURN (ACE_SYNCH_RECURSIVE_MUTEX, guard, this->synch_lock_, -1);
#ifdef KOKYU_DSRT_LOGGING
ACE_DEBUG ((LM_DEBUG,
@@ -216,9 +216,9 @@ schedule_i (Guid_t id, const DSRT_QoSDescriptor& qos)
this->blocked_prio_,
this->sched_policy_) == -1)
{
- ACE_ERROR ((LM_ERROR,
+ ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("%p\n"),
- ACE_TEXT ("thr_setprio failed")));
+ ACE_TEXT ("thr_setprio failed")), -1);
}
#ifdef KOKYU_DSRT_LOGGING
diff --git a/Kokyu/Default_Dispatcher_Impl.cpp b/Kokyu/Default_Dispatcher_Impl.cpp
index 3b7dbcafa4c..9403b46a892 100644
--- a/Kokyu/Default_Dispatcher_Impl.cpp
+++ b/Kokyu/Default_Dispatcher_Impl.cpp
@@ -127,8 +127,10 @@ Default_Dispatcher_Impl::dispatch_i (const Dispatch_Command* cmd,
Dispatcher_Task* task =
find_task_with_preemption_prio (qos_info.preemption_priority_);
+ //@@VS - We should insert this into the lowest prio queue.
+ //How do we know that the last queue is the lowest prio queue.
if (task == 0)
- task = tasks_[0].get ();
+ task = tasks_[ntasks_-1].get ();
return task->enqueue (cmd, qos_info);
}
@@ -136,6 +138,9 @@ Default_Dispatcher_Impl::dispatch_i (const Dispatch_Command* cmd,
int
Default_Dispatcher_Impl::shutdown_i ()
{
+ //This needs to be revisited based on mode transition and
+ //consistent cut through the queues
+
//post shutdown command to all tasks
int i;
diff --git a/Kokyu/Dispatcher_Task.cpp b/Kokyu/Dispatcher_Task.cpp
index dc0810b76c3..8002d3a581d 100644
--- a/Kokyu/Dispatcher_Task.cpp
+++ b/Kokyu/Dispatcher_Task.cpp
@@ -12,6 +12,7 @@
ACE_RCSID(Kokyu, Dispatcher_Task, "$Id$")
namespace
+//anonymous namespace - use this to avoid polluting the global namespace
{
const int ALLOC_POOL_CHUNKS = 200;
}
diff --git a/Kokyu/Dispatcher_Task.h b/Kokyu/Dispatcher_Task.h
index 09be9974140..0bb91313f47 100644
--- a/Kokyu/Dispatcher_Task.h
+++ b/Kokyu/Dispatcher_Task.h
@@ -83,7 +83,6 @@ private:
private:
ConfigInfo curr_config_info_;
- /// An per-task allocator
ACE_Allocator *allocator_;
int own_allocator_;
diff --git a/Kokyu/Kokyu.h b/Kokyu/Kokyu.h
index c5a47ff90b6..b2e041bed8c 100644
--- a/Kokyu/Kokyu.h
+++ b/Kokyu/Kokyu.h
@@ -32,6 +32,14 @@
//around.
#include "Dispatcher_Impl.h"
+//#################################################################
+//Beware that this interface will be subject to change in the future
+//since this is the very initial release. We will be working on
+//trying to merge the DSRT and EC mechanisms in the future. If you
+//are a user of this interface, kindly let us know so that we can
+//coordinate with you when we refactor this interface.
+//##################################################################
+
namespace Kokyu
{
//class Dispatcher_Impl;
diff --git a/Kokyu/Kokyu_defs.i b/Kokyu/Kokyu_defs.i
index a10283c0d7b..50b780ab2c7 100644
--- a/Kokyu/Kokyu_defs.i
+++ b/Kokyu/Kokyu_defs.i
@@ -18,8 +18,8 @@ void Dispatcher_Attributes::sched_scope(int scope)
ACE_INLINE
Reordering_Queue_Attributes::Reordering_Queue_Attributes ()
- :static_bit_field_mask_ (0), // 2^(10) - 1
- static_bit_field_shift_ (0), // 10 low order bits
+ :static_bit_field_mask_ (0), // not used
+ static_bit_field_shift_ (0), // not used
dynamic_priority_max_ (0x7FFFFFFFUL), // 2^31-1
dynamic_priority_offset_ (0x08000000UL) // 15/16th of dynamic prio range
{