diff options
author | venkita <venkita@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-10-12 02:58:20 +0000 |
---|---|---|
committer | venkita <venkita@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-10-12 02:58:20 +0000 |
commit | 1f89455515043242c68c7b16f248796452c9ae03 (patch) | |
tree | 2c45f8e6a9f3bdc565f33f3290dfba218244ec0b /TAO | |
parent | 0ac825ef47e755ea99f8ab399f727411ccea0a19 (diff) | |
download | ATCD-1f89455515043242c68c7b16f248796452c9ae03.tar.gz |
ChangeLogTag: Sat Oct 11 21:42:36 2003 Venkita Subramonian <venkita@cs.wustl.edu>
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/ChangeLog | 11 | ||||
-rw-r--r-- | TAO/orbsvcs/examples/RtEC/Kokyu/svc.conf | 3 | ||||
-rw-r--r-- | TAO/orbsvcs/examples/RtEC/Kokyu/svc.conf.xml | 5 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.cpp | 10 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.h | 6 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.cpp | 39 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.h | 8 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.i | 4 |
8 files changed, 74 insertions, 12 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index f60ceefa3c1..87df8505f5d 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,14 @@ +Sat Oct 11 21:42:36 2003 Venkita Subramonian <venkita@cs.wustl.edu> + + * orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.{h,cpp}: + * orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.{h,i,cpp}: + Added scheduling policy and scope to configure the Kokyu + dispatcher with. + + * orbsvcs/examples/RtEC/Kokyu/svc.conf.xml: + * orbsvcs/examples/RtEC/Kokyu/svc.conf: Added scheduling policy + for the example to configure the Kokyu dispatcher. + Sat Oct 11 11:28:04 2003 Venkita Subramonian <venkita@cs.wustl.edu> * examples/RTScheduling/Starter.dsp: Added include/library paths diff --git a/TAO/orbsvcs/examples/RtEC/Kokyu/svc.conf b/TAO/orbsvcs/examples/RtEC/Kokyu/svc.conf index bfbfac829b5..60b006dd1ef 100644 --- a/TAO/orbsvcs/examples/RtEC/Kokyu/svc.conf +++ b/TAO/orbsvcs/examples/RtEC/Kokyu/svc.conf @@ -1,2 +1,3 @@ # $Id$ -static EC_Factory "-ECProxyPushConsumerCollection mt:immediate:list -ECProxyPushSupplierCollection mt:immediate:list -ECdispatching kokyu -ECscheduling kokyu -ECfiltering kokyu -ECproxyconsumerlock thread -ECproxysupplierlock thread -ECsupplierfiltering per-supplier" +#change SCHED_OTHER to SCHED_FIFO or SCHED_RR to run in Real time class +static EC_Factory "-ECProxyPushConsumerCollection mt:immediate:list -ECProxyPushSupplierCollection mt:immediate:list -ECdispatching kokyu SCHED_OTHER -ECscheduling kokyu -ECfiltering kokyu -ECproxyconsumerlock thread -ECproxysupplierlock thread -ECsupplierfiltering per-supplier" diff --git a/TAO/orbsvcs/examples/RtEC/Kokyu/svc.conf.xml b/TAO/orbsvcs/examples/RtEC/Kokyu/svc.conf.xml index 2bc3e1255ca..41409e40ec9 100644 --- a/TAO/orbsvcs/examples/RtEC/Kokyu/svc.conf.xml +++ b/TAO/orbsvcs/examples/RtEC/Kokyu/svc.conf.xml @@ -1,6 +1,7 @@ <?xml version='1.0'?> -<!-- Converted from ./orbsvcs/examples/RtEC/Schedule/svc.conf by svcconf-convert.pl --> +<!-- Converted from svc.conf by svcconf-convert.pl --> <ACE_Svc_Conf> <!-- $Id$ --> - <static id="EC_Factory" params="-ECProxyPushConsumerCollection mt:immediate:list -ECProxyPushSupplierCollection mt:immediate:list -ECdispatching kokyu -ECscheduling kokyu -ECfiltering kokyu -ECproxyconsumerlock thread -ECproxysupplierlock thread -ECsupplierfiltering per-supplier"/> + <!-- change SCHED_OTHER to SCHED_FIFO or SCHED_RR to run in Real time class --> + <static id="EC_Factory" params="-ECProxyPushConsumerCollection mt:immediate:list -ECProxyPushSupplierCollection mt:immediate:list -ECdispatching kokyu SCHED_OTHER -ECscheduling kokyu -ECfiltering kokyu -ECproxyconsumerlock thread -ECproxysupplierlock thread -ECsupplierfiltering per-supplier"/> </ACE_Svc_Conf> diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.cpp index b46de124273..dd8cab7cac1 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.cpp @@ -19,10 +19,12 @@ ACE_RCSID(Event, EC_Kokyu_Dispatching, "$Id$") -TAO_EC_Kokyu_Dispatching::TAO_EC_Kokyu_Dispatching (TAO_EC_Event_Channel_Base *ec) +TAO_EC_Kokyu_Dispatching::TAO_EC_Kokyu_Dispatching (TAO_EC_Event_Channel_Base *ec, int sched_policy, int sched_scope) :allocator_ (0), dispatcher_ (0), - lanes_setup_ (0) + lanes_setup_ (0), + disp_sched_policy_ (sched_policy), + disp_sched_scope_ (sched_scope) { CORBA::Object_var tmp = ec->scheduler (); this->scheduler_ = RtecScheduler::Scheduler::_narrow (tmp.in ()); @@ -30,7 +32,7 @@ TAO_EC_Kokyu_Dispatching::TAO_EC_Kokyu_Dispatching (TAO_EC_Event_Channel_Base *e //@@VS - need to revisit this - should be some other allocator if (this->allocator_ == 0) { - this->allocator_ = new ACE_New_Allocator (); + this->allocator_ = ACE_Allocator::instance (); } } @@ -85,6 +87,8 @@ TAO_EC_Kokyu_Dispatching::setup_lanes (void) Kokyu::Dispatcher_Attributes attrs; attrs.config_info_set_ = kconfigs; + attrs.sched_policy (disp_sched_policy_); + attrs.sched_scope (disp_sched_scope_); // Create Kokyu::Dispatcher using factory Kokyu::Dispatcher_Auto_Ptr diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.h b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.h index 7cc9d9ed191..ec54bc03226 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.h +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Dispatching.h @@ -55,7 +55,9 @@ class TAO_RTKokyuEvent_Export TAO_EC_Kokyu_Dispatching : public TAO_EC_Dispatchi public: /// The scheduler is used to find the range of priorities and similar /// info. - TAO_EC_Kokyu_Dispatching (TAO_EC_Event_Channel_Base* ec); + TAO_EC_Kokyu_Dispatching (TAO_EC_Event_Channel_Base* ec, + int sched_policy, + int sched_scope); // = The EC_Dispatching methods. virtual void activate (void); @@ -83,6 +85,8 @@ private: RtecScheduler::Scheduler_var scheduler_; int lanes_setup_; + int disp_sched_policy_; + int disp_sched_scope_; }; // **************************************************************** diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.cpp index 015c5e97b85..e30cfbe09a0 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.cpp @@ -64,6 +64,41 @@ TAO_EC_Kokyu_Factory::init (int argc, ACE_TCHAR* argv[]) } arg_shifter.consume_arg (); } + //if Kokyu dispatching - look for sched policy + if (this->dispatching_ == 2) + { + if (arg_shifter.is_parameter_next ()) + { + const ACE_TCHAR* opt = arg_shifter.get_current (); + if (ACE_OS::strcasecmp (opt, ACE_LIB_TEXT("SCHED_FIFO")) == 0) + { + this->disp_sched_policy_ = ACE_SCHED_FIFO; + } + else if (ACE_OS::strcasecmp (opt, ACE_LIB_TEXT("SCHED_RR")) == 0) + { + this->disp_sched_policy_ = ACE_SCHED_RR; + } + else + { + this->disp_sched_policy_ = ACE_SCHED_OTHER; + } + arg_shifter.consume_arg (); + + if (arg_shifter.is_parameter_next ()) + { + const ACE_TCHAR* opt = arg_shifter.get_current (); + if (ACE_OS::strcasecmp (opt, ACE_LIB_TEXT("SYSTEM")) == 0) + { + this->disp_sched_policy_ = ACE_SCOPE_THREAD; + } + else if (ACE_OS::strcasecmp (opt, ACE_LIB_TEXT("PROCESS")) == 0) + { + this->disp_sched_policy_ = ACE_SCOPE_PROCESS; + } + arg_shifter.consume_arg (); + } + } + } } else if (ACE_OS::strcasecmp (arg, ACE_LIB_TEXT("-ECFiltering")) == 0) @@ -178,7 +213,9 @@ TAO_EC_Dispatching* TAO_EC_Kokyu_Factory::create_dispatching (TAO_EC_Event_Channel_Base *ec) { if (this->dispatching_ == 2) - return new TAO_EC_Kokyu_Dispatching (ec); + return new TAO_EC_Kokyu_Dispatching (ec, + this->disp_sched_policy_, + this->disp_sched_scope_); return this->TAO_EC_Default_Factory::create_dispatching (ec); } diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.h b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.h index ce773eaeb85..9a1f9ddd4d2 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.h +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.h @@ -6,9 +6,9 @@ * * @author Bryan Thrall (thrall@cs.wustl.edu) * - * Based on previous work by Carlos O'Ryan (coryan@cs.wustl.edu) and - * Tim Harrison (harrison@cs.wustl.edu) and other members of the DOC group. - * More details can be found in: + * Based on previous work by Carlos O'Ryan (coryan@cs.wustl.edu), Tim + * Harrison (harrison@cs.wustl.edu), Chris Gill (cdgill@cs.wustl.edu) + * and other members of the DOC group. More details can be found in: * * http://doc.ece.uci.edu/~coryan/EC/index.html */ @@ -59,6 +59,8 @@ public: create_scheduling_strategy (TAO_EC_Event_Channel_Base*); private: + int disp_sched_policy_; + int disp_sched_scope_; }; #if defined (__ACE_INLINE__) diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.i b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.i index 818dcde9254..cc78b5b83c8 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.i +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Kokyu_Factory.i @@ -2,6 +2,8 @@ ACE_INLINE TAO_EC_Kokyu_Factory::TAO_EC_Kokyu_Factory (void) - : TAO_EC_Default_Factory () + : TAO_EC_Default_Factory (), + disp_sched_policy_ (ACE_SCHED_FIFO), + disp_sched_scope_ (ACE_SCOPE_THREAD) { } |