From 27f8743af7862b9d3c568e58d985659787270e48 Mon Sep 17 00:00:00 2001 From: arvindk Date: Thu, 29 Sep 2005 21:38:53 +0000 Subject: ChangelogTag: Thu Sep 29 16:07:02 2005 Arvind S. Krishna --- ChangeLog | 42 ++ bin/FOCUS/FOCUS.pl | 203 +++++++++ bin/FOCUS/NEWS | 35 ++ bin/FOCUS/PROBLEM-REPORT-FORM | 45 ++ bin/FOCUS/README | 76 ++++ bin/FOCUS/VERSION | 1 + .../Leader_Follower_Flushing_Strategy.spl | 211 ++++++++++ .../specializations/Messaging_Strategy/GIOP.spl | 246 +++++++++++ bin/FOCUS/specializations/README | 16 + .../Reactor_Family/Select_Reactor_MT.spl | 450 ++++++++++++++++++++ .../Reactor_Family/Select_Reactor_ST.spl | 466 +++++++++++++++++++++ .../specializations/Reactor_Family/TP_Reactor.spl | 439 +++++++++++++++++++ .../specializations/Wait_Strategy/Wait_On_Read.spl | 105 +++++ 13 files changed, 2335 insertions(+) create mode 100755 bin/FOCUS/FOCUS.pl create mode 100644 bin/FOCUS/NEWS create mode 100644 bin/FOCUS/PROBLEM-REPORT-FORM create mode 100644 bin/FOCUS/README create mode 100644 bin/FOCUS/VERSION create mode 100644 bin/FOCUS/specializations/Flushing_Strategy/Leader_Follower_Flushing_Strategy.spl create mode 100644 bin/FOCUS/specializations/Messaging_Strategy/GIOP.spl create mode 100644 bin/FOCUS/specializations/README create mode 100644 bin/FOCUS/specializations/Reactor_Family/Select_Reactor_MT.spl create mode 100644 bin/FOCUS/specializations/Reactor_Family/Select_Reactor_ST.spl create mode 100644 bin/FOCUS/specializations/Reactor_Family/TP_Reactor.spl create mode 100644 bin/FOCUS/specializations/Wait_Strategy/Wait_On_Read.spl diff --git a/ChangeLog b/ChangeLog index 5eba3d68402..7854f6e7e88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,45 @@ +Thu Sep 29 16:07:02 2005 Arvind S. Krishna + + * bin/FOCUS: + Directory where FOCUS related work will be added. + + * bin/FOCUS/ChangeLog: + * bin/FOCUS/FOCUS.pl: + * bin/FOCUS/NEWS: + * bin/FOCUS/PROBLEM-REPORT-FORM: + * bin/FOCUS/Parser: + * bin/FOCUS/README: + * bin/FOCUS/VERSION: + * bin/FOCUS/docs: + * bin/FOCUS/specializations: + + FOCUS related files and directories. Please read the Changelog + in FOCUS for more details on each component. + + * bin/FOCUS/specializations/Context-Specific-Optimizations: + * bin/FOCUS/specializations/Flushing_Strategy: + * bin/FOCUS/specializations/Messaging_Strategy: + * bin/FOCUS/specializations/Protocol_Family: + * bin/FOCUS/specializations/README: + * bin/FOCUS/specializations/Reactor_Family: + * bin/FOCUS/specializations/Wait_Strategy: + + Specializations for the different components in ACE+TAO. Each + directory contains the specialization files for specializing the + appropriate component/strategy. + + * bin/FOCUS/Parser/FOCUSParser.pm: + + Parser/weaver that reads the specialization description and + performs the transformations. + + * bin/FOCUS/docs/FOCUS.html: + + Start at the documentation effort. + + The Changelogs within the FOCUS directory will capture the + different changes henceforth. + Thu Sep 29 13:28:29 2005 Chris Cleeland * bin/fuzz.pl (check_for_refcountservantbase): diff --git a/bin/FOCUS/FOCUS.pl b/bin/FOCUS/FOCUS.pl new file mode 100755 index 00000000000..e82acfe63cc --- /dev/null +++ b/bin/FOCUS/FOCUS.pl @@ -0,0 +1,203 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; +######################################################################### +# FOCUS: A Feature Oriented Customization tool for ACE+TAO. +# +# Usage: +# ====== +# --prefix-path - gives the prefix to the place where ACE+TAO is installed +# --reactor-spl - provide the component that needs to be specialized +# --protocol-spl - provide the concrete protocol to specialize +# --output-prefix-path - +# (Optional) if specified, copies all the files to the +# output prefix. The directory structure is maintained. +# That is if foo/bar.h file was specialized. Then the +# output will be /foo/bar.h +# +# Adding New Specializations +# =========================== +# (1) Add a new command line option if the specialization belongs to a +# new family of components. For example, Concurrency strategy +# (1.b) If not, then enhance exisiting option with a new value +# (2) Associate a specialization file for the concrete component being +# specialized. +# (3) Update the specializations directory appropriately to add the +# specializations file. +# +# @author Arvind S. Krishna +# +# $Id$ +# +######################################################################## +use Getopt::Long; + +# This script can be invoked from anywhere. We need to add this to the +# path +use lib "$ENV{ACE_ROOT}/bin"; + +use FOCUS::Parser::FOCUSParser; + +sub usage +{ + + # How to use FOCUS + # Currently FOCUS supports the specialization of reactor and protocol + # families + my $usage = "usage: \n ./FOCUS " + . " \n --prefix-path=" + . " [\n --reactor-spl=" + . " \n --protocol-spl=" + . " \n --wait-strategy-spl=" + . " \n --output-prefix=" + . " \n --messaging-spl=" + . " \n --context-specific-optimizations=" + . " \n ]" + . "\n"; + print "$usage \n"; +} + +# Global Table that maps the specialization name to the file +# select => "../specializations/Reactor_Family/Select_Reactor.spl +# For each component that one needs to specialize add an entry in +# this simple global table to execute the specializations. + +# Get the ACE_ROOT ENV variable. Then the specializations +# can be accessed via $ACE_ROOT/bin/FOCUS/..... +my $spl_prefix_path = ""; +if (defined $ENV{"ACE_ROOT"}) +{ + $spl_prefix_path = $ENV{"ACE_ROOT"}; + + # Check if the prefix path ends with a / or not + # if it does not then manually add the / to it + my $last = substr ($spl_prefix_path, -1); + if ($last ne "/") + { + $spl_prefix_path = $spl_prefix_path . "/"; + } + + # Add the bin/FOCUS directory to the prefix path + $spl_prefix_path = $spl_prefix_path . "bin/FOCUS/"; + +} +else +{ + print "FOCUS: ACE_ROOT environment variable not defined. Exiting... \n"; + exit 1; +} + +my %specialization_table = ( + "select-mt", $spl_prefix_path . "specializations/Reactor_Family/Select_Reactor_MT.spl", + "select-st", $spl_prefix_path . "specializations/Reactor_Family/Select_Reactor_ST.spl", + "tp-reactor",$spl_prefix_path . "specializations/Reactor_Family/TP_Reactor.spl", + "giop", $spl_prefix_path . "specializations/Messaging_Strategy/GIOP.spl", + "iiop", $spl_prefix_path . "specializations/Protocol_Family/IIOP/iiop.spl", + "rw", $spl_prefix_path . "specializations/Wait_Strategy/Wait_On_Read.spl", + "dispatch", $spl_prefix_path . "specializations/Context-Specific-Optimizations/Dispatch-Resolution-Optimization.spl"); + +# Get the command line options +my $ret = GetOptions ("prefix-path=s" => \$prefix_path, + "reactor-spl=s" => \$reactor_type, + "protocol-spl=s" => \$protocol_type, + "messaging-spl=s" => \$messaging_type, + "wait-strategy-spl=s" => \$wait_strat_type, + "output-prefix:s" => \$output_prefix, + "context-specific-optimizations=s" => \$context_opt); + +# Check if the prefix path is specified +if (!$prefix_path) +{ + usage; + exit 1; +} + +# +# Check if the optional outputpath is specified +# if it not specified then the output_prefix will +# be same as the prefix_path. +# So if the prefix is something like: +# /build/arvindk/ACE_wrappers, then the output_prefix +# will be the same. +# +# Upshot: The source files will be directly replaced. +# +if (! $output_prefix) +{ + $output_prefix = $prefix_path; +} + +# Check if the type of each component specialized is valid! +if ($reactor_type) +{ + my $spl_file = $specialization_table {$reactor_type}; + if (! length ($spl_file)) + { + print "Invalid reactor type specified \n"; + usage; + exit 1; + } + + # specialize the Reactor component + FOCUSParser::Specialize_Components ($prefix_path, $spl_file, $output_prefix); +} + +# protocol specialization +if ($protocol_type) +{ + my $spl_file = $specialization_table {$protocol_type}; + if (! spl_file) + { + print "Invalid reactor type specified \n"; + usage; + exit 1; + } + + # specialize the Protocol component + FOCUSParser::Specialize_Components ($prefix_path, $spl_file, $output_prefix); +} + +# Wait Strategy specialization +if ($wait_strat_type) +{ + my $spl_file = $specialization_table {$wait_strat_type}; + if (! spl_file) + { + print "Invalid specialization for the Wait strategy \n"; + usage; + exit 1; + } + + # specialize the wait strategy + FOCUSParser::Specialize_Components ($prefix_path, $spl_file, $output_prefix); +} + +#Messaging specialization +if ($messaging_type) +{ + my $spl_file = $specialization_table {$messaging_type}; + if (! spl_file) + { + print "Invalid specialization for Messaging strategy \n"; + usage; + exit 1; + } + + # specialize the wait strategy + FOCUSParser::Specialize_Components ($prefix_path, $spl_file, $output_prefix); +} + +# Context specific optimizations present +if ($context_opt) +{ + my $spl_file = $specialization_table {$context_opt}; + if (! spl_file) + { + print "Invalid Context specialization optimization specified\n"; + usage; + exit 1; + } + + # specialize the wait strategy + FOCUSParser::Specialize_Components ($prefix_path, $spl_file, $output_prefix); +} diff --git a/bin/FOCUS/NEWS b/bin/FOCUS/NEWS new file mode 100644 index 00000000000..29dd15e6a3d --- /dev/null +++ b/bin/FOCUS/NEWS @@ -0,0 +1,35 @@ +USER VISIBLE CHANGES AND CAPABILITIES ADDED TO FOCUS: +===================================================== + +. Support for specialization of ACE Reactor Framework + -- Specialization of ACE_Select_Reactor both st and mt + -- Specialization of ACE_TP_Reactor + +. Support for specialization of Pluggable Messaging in TAO + -- Specialization of Pluggable Messaging Interface based on GIOP + +. Support for specializing the Pluggable Protocol framework in TAO + -- Specialization for IIOP protocol implementation in TAO + +FUTURE CAPABILITIES and PLANNED CHANGES +======================================== +ACE+TAO component specialization related capabilities +----------------------------------------------------- +. Support for specialization of the Messaging Framework based on GIOP_Lite +. Support for specialization of Wait Strategy including Leader_Follower wait strategy +. Support for specialization of Flushing Strategy components + +FOCUS Specialization Language Enhancements +------------------------------------------ +. Support for multi line search and replace capabilities +. Support for ensuring source files are not corrupted when multiple + specializations are grouped together when the specializations are + added. + +FOCUS Transformation Related Enhancements +---------------------------------------- +. Support for undo feature for the transformations. This is going to be + really hard. I am not sure if this is doable +. Specifying dependencies between the different specializations. If one + is incompatible with the other, then this needs to be detected before + the specializations are executed. diff --git a/bin/FOCUS/PROBLEM-REPORT-FORM b/bin/FOCUS/PROBLEM-REPORT-FORM new file mode 100644 index 00000000000..9538e1d58df --- /dev/null +++ b/bin/FOCUS/PROBLEM-REPORT-FORM @@ -0,0 +1,45 @@ +To: arvindk@dre.vanderbilt.edu +Subject: [area]: [synopsis] + + TAO VERSION: + ACE VERSION: + + HOST MACHINE and OPERATING SYSTEM: + + + TARGET MACHINE and OPERATING SYSTEM, if different from HOST: + COMPILER NAME AND VERSION (AND PATCHLEVEL): + + FOCUS COMMAND LINE OPTION + [What command line option did you use for FOCUS?] + + AREA/CLASS/EXAMPLE AFFECTED: +[What example failed? What module failed to compile?] + + DOES THE PROBLEM AFFECT: + COMPILATION? + [ What compiler are you using? Please cut n paste the + compilation error.] + + LINKING? + [ On Unix systems, did you run make realclean first?] + EXECUTION? + OTHER (please specify)? + +[Please indicate whether ACE/TAO, your application, or both are affected.] + + SYNOPSIS: +[Brief description of the problem] + + DESCRIPTION: +[Detailed description of problem. Don't just say " +doesn't work, here's a fix," explain what your program does +to get to the state. ] + + SAMPLE FIX/WORKAROUND: +[If available ] + + ACE+TAO INSTRUMENTED FILES: + Please if possible attach the ACE+TAO instrumented files (source + files) that affected your application. (Please use a compression + utility for sending the attachments) diff --git a/bin/FOCUS/README b/bin/FOCUS/README new file mode 100644 index 00000000000..14f3c804dc9 --- /dev/null +++ b/bin/FOCUS/README @@ -0,0 +1,76 @@ + + FOCUS README + ============ + +Motivation: +---------- +Middleware is often developed as a set of frameworks that can be +extended and configured with alternative implementations of key +components, such as different types of transport protocols e.g., +TCP/IP, VME, or shared memory), event demultiplexing mechanisms +e.g., reactive-, proactive-, or thread-based), request +demultiplexing strategies (e.g., dynamic hashing, perfect +hashing, or active demuxing), and concurrency models (e.g., +thread-per-connection, thread pool, or thread-pre-request). A +particular DRE application, however, may only use a small subset +of the potential framework alternatives. As a result, general-purpose +middleware may be overly extensible, i.e., contain +unnecessary overhead for indirection and dynamic dispatching that is +not needed for use cases in a particular context. +A challenge is to develop middleware specialization +techniques that can eliminate unnecessary overhead associated with +overly extensible middleware framework implementations for certain +product variants or application-specific contexts. + +Example and Approach: +-------------------- +The reactor framework in ACE allows plug and play of different +reactors such as Select, TP, Devpoll etc. The TAO middleware +implementation and applications that run atop TAO typically use +one particular implementation of the Reactor. For example, a +single-threaded application might use select_* reactors. The +Reactor framework uses the bridge pattern to transparently +invoke operations on the right reactors. When the concrete +Reactor is known, it should be possible to specialize the +framework to use the concrete reactor directly rather than use +the bridge. + +As a part of the Feature Oriented Customizer (FOCUS) tool being +,we are trying to specialize frameworks +when the concrete implementation type is known a priori. FOCUS +provides an XML based transformation engine, where the +specialization transformations are captured in XML file and a +weaver specializes the code. + +To help in this transformation process, FOCUS applies markers +within the source code. These markers are added as special +comments. For example, //@@ REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK +represents a hook where forward declarations and include files are +added by the weaver. As these markers are comments therefore should not +affect normal applications in *any* manner. Additionally, applications +that use multiple reactor implementations not be affected/do not need any +change. Currently, these specializations are targeted for TAO middleware, +where applications know the target reactor a priori and want to +leverage the specialization to improve performance. + +FOCUS Installation +------------------ +. FOCUS is written using Perl and does not require any compilation. Additionally + FOCUS does not depend on any external tools. + +Requirements +------------ +. FOCUS has been tested on Perl version 5.8.0 and uses the following Perl + packages: + -- XML::DOM package --> Perl package for processing XML DTDs + +Sample Usage: +------------- +FOCUS can be invoked from the command line in the following manner: +cmd>$ACE_ROOT/bin/FOCUS/FOCUS.pl --reactor-spl=select-st + --prefix-path=/build/arvindk/ACE_wrappers + --output-prefix=/build/arvindk/spl-files + +More Information: +----------------- +More information about FOCUS should be available from the docs directory. diff --git a/bin/FOCUS/VERSION b/bin/FOCUS/VERSION new file mode 100644 index 00000000000..b41df4e4c7b --- /dev/null +++ b/bin/FOCUS/VERSION @@ -0,0 +1 @@ +This is FOCUS version 0.0.1 alpha diff --git a/bin/FOCUS/specializations/Flushing_Strategy/Leader_Follower_Flushing_Strategy.spl b/bin/FOCUS/specializations/Flushing_Strategy/Leader_Follower_Flushing_Strategy.spl new file mode 100644 index 00000000000..a33b90ba255 --- /dev/null +++ b/bin/FOCUS/specializations/Flushing_Strategy/Leader_Follower_Flushing_Strategy.spl @@ -0,0 +1,211 @@ + + + + + + + + + + + + +#include "Flushing_Strategy.h" + + + + FLUSHING_STRATEGY_SPL_INCLUDE_ADD_HOOK + +class TAO_Transport; +class TAO_Queued_Message; +class ACE_Time_Value; + +#include "TAO_Export.h" + + + + +virtual + + +: public TAO_Flushing_Strategy + + + + + + + + Flushing_Strategy.h + // Flushing_Strategy.h + + + Flushing_Strategy.cpp + // Flushing_Strategy.cpp + + + + Block_Flushing_Strategy.h + // Block_Flushing_Strategy.h + + + Block_Flushing_Strategy.cpp + // Block_Flushing_Strategy.cpp + + + + Reactive_Flushing_Strategy.h + // Reactive_Flushing_Strategy.h + + + Reactive_Flushing_Strategy.cpp + // Reactive_Flushing_Strategy.cpp + + + + + + + + #include "tao/Reactive_Flushing_Strategy.h" + // #include "tao/Reactive_Flushing_Strategy.h" + + + + #include "tao/Block_Flushing_Strategy.h" + // #include "tao/Block_Flushing_Strategy.h" + + + + + TAO_Flushing_Strategy + TAO_Leader_Follower_Flushing_Strategy + + + + + FLUSHING_STRATEGY_SPL_COMMENT_HOOK_START + FLUSHING_STRATEGY_SPL_COMMENT_HOOK_END + + + + + FLUSHING_STRATEGY_SPL_COMMENT_HOOK_END + this->flushing_strategy_type_ = TAO_LEADER_FOLLOWER_FLUSHING; + + + + + + FLUSHING_STRATEGY_CREATION_SPL_HOOK_START + FLUSHING_STRATEGY_CREATION_SPL_HOOK_END + + + + + FLUSHING_STRATEGY_CREATION_SPL_HOOK_END + ACE_NEW_RETURN (strategy, + TAO_Leader_Follower_Flushing_Strategy, + 0); + + + + + + + + + + TAO_Flushing_Strategy + TAO_Leader_Follower_Flushing_Strategy + + + + + + + + + TAO_Flushing_Strategy + TAO_Leader_Follower_Flushing_Strategy + + + + + + + + + #include "Flushing_Strategy.h" + #include "Leader_Follower_Flushing_Strategy + + + + + + + + + TAO_Flushing_Strategy + TAO_Leader_Follower_Flushing_Strategy + + + + + + + + + friend class TAO_Reactive_Flushing_Strategy; + // friend class TAO_Reactive_Flushing_Strategy; + + + + + friend class TAO_Block_Flushing_Strategy; + // friend class TAO_Block_Flushing_Strategy; + + + + + + + + #include "Flushing_Strategy.h" + #include "Leader_Follower_Flushing_Strategy.h + + + + + TAO_Flushing_Strategy + TAO_Leader_Follower_Flushing_strategy + + + + + + + + + TAO_Flushing_Strategy + TAO_Leader_Follower_Flushing_Strategy + + + + + + + diff --git a/bin/FOCUS/specializations/Messaging_Strategy/GIOP.spl b/bin/FOCUS/specializations/Messaging_Strategy/GIOP.spl new file mode 100644 index 00000000000..76e27509848 --- /dev/null +++ b/bin/FOCUS/specializations/Messaging_Strategy/GIOP.spl @@ -0,0 +1,246 @@ + + + + + + + + + + + + + + GIOP_Message_Lite.cpp + // GIOP_Message_Lite.cpp + + + GIOP_Message_Lite.h + // GIOP_Message_Lite.h + + + Pluggable_Messaging.h + // Pluggable_Messaging.h + + + Pluggable_Messaging.cpp + // Pluggable_Messaging.cpp + + + + + + + +#include "tao/Pluggable_Messaging.h" + + +virtual + + +: public TAO_Pluggable_Messaging + + + + MESSAGING_SPL_EXTERN_ADD_HOOK + typedef TAO_GIOP_Message_Base TAO_Pluggable_Messaging; + + + + + + int is_ready_for_bidirectional \(TAO_OutputCDR &msg\); + + +public: + int is_ready_for_bidirectional (TAO_OutputCDR &msg); + +protected: + + + + + + + + +class TAO_Pluggable_Messaging; + + + + + + +class TAO_Pluggable_Messaging; + + + + + + + + class TAO_Pluggable_Messaging; + #include "tao/GIOP_Message_Base.h" + + + + + + + +#include "Pluggable_Messaging.h" + + + + + + + class TAO_Pluggable_Messaging; + #include "tao/GIOP_Message_Base.h" + + + + + #include "Pluggable_Messaging.h" + + + + + + + + + + + class TAO_Pluggable_Messaging; + #include "tao/GIOP_Message_Base.h" + + + + + + #include "tao/Pluggable_Messaging.h" + + + + + #include "tao/Pluggable_Messaging.h" + #include "tao/GIOP_Message_Base.h" + + + + + #include "tao/Pluggable_Messaging.h" + + + + + + + + class TAO_Pluggable_Messaging; + + + + class TAO_Pluggable_Messaging; + + + + + + + MESSAGING_SPL_COMMENT_HOOK_START + MESSAGING_SPL_COMMENT_HOOK_END + + + + MESSAGING_SPL_COMMENT_HOOK_END + + ACE_NEW (this->messaging_object_, + TAO_GIOP_Message_Base (orb_core, + ACE_MAX_DGRAM_SIZE)); + + + + #include "tao/GIOP_Message_Lite.h" + + + + + class TAO_Pluggable_Messaging; + + + + #include "tao/GIOP_Message_Lite.h" + + + + MESSAGING_SPL_COMMENT_HOOK_START + MESSAGING_SPL_COMMENT_HOOK_END + + + + MESSAGING_SPL_COMMENT_HOOK_END + + ACE_NEW (this->messaging_object_, + TAO_GIOP_Message_Base (orb_core, + ACE_MAX_DGRAM_SIZE)); + + + + + + + class TAO_Pluggable_Messaging; + + + + #include "tao/GIOP_Message_Lite.h" + + + + class TAO_Pluggable_Messaging; + + + + + + + MESSAGING_SPL_COMMENT_HOOK_START + MESSAGING_SPL_COMMENT_HOOK_END + + + + MESSAGING_SPL_COMMENT_HOOK_END + + ACE_NEW (this->messaging_object_, + TAO_GIOP_Message_Base (orb_core, + ACE_MAX_DGRAM_SIZE)); + + + #include "tao/GIOP_Message_Lite.h" + + + + + + + #include "tao/Pluggable_Messaging.h" + #include "tao/GIOP_Message_Base.h" + + + + + diff --git a/bin/FOCUS/specializations/README b/bin/FOCUS/specializations/README new file mode 100644 index 00000000000..e2126bf6566 --- /dev/null +++ b/bin/FOCUS/specializations/README @@ -0,0 +1,16 @@ +@file README +============ + +This file describes certain common conventions regarding how the +specializations rules are integrated/added to this specialization +database. This directory will serve as a repository that will host all +the specialization rules for the different families/components. At the +moment, all the specialization transformations are specific to the +ACE+TAO middleware. + +For each component framework, the following are the rules for adding +the specializations: + +. Create a directory with the name of the component family, e.g., Reactor_Family +. Within this directory, create the <>.spl file that has the + individual transformations defined. diff --git a/bin/FOCUS/specializations/Reactor_Family/Select_Reactor_MT.spl b/bin/FOCUS/specializations/Reactor_Family/Select_Reactor_MT.spl new file mode 100644 index 00000000000..c7541cc6915 --- /dev/null +++ b/bin/FOCUS/specializations/Reactor_Family/Select_Reactor_MT.spl @@ -0,0 +1,450 @@ + + + + + + + + + + + + + + + REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK + class ACE_Sig_Handler; + class ACE_Sig_Action; + class ACE_Sig_Set; + + + + REACTOR_SPL_PUBLIC_METHODS_ADD_HOOK + +//--- How can we devirtualize these methods? +virtual ~ACE_Select_Reactor_Impl () {} + +virtual int notify (ACE_Event_Handler *event_handler = 0, + ACE_Reactor_Mask mask = ACE_Event_Handler::EXCEPT_MASK, + ACE_Time_Value * = 0) =0; + +virtual int remove_handler (ACE_Event_Handler *eh, + ACE_Reactor_Mask mask) =0; + +virtual int register_handler (ACE_HANDLE handle, + ACE_Event_Handler *eh, + ACE_Reactor_Mask mask) =0; + + + + +virtual +: public ACE_Reactor_Impl +#include "ace/Reactor_Impl.h" + + + + public ACE_Reactor_Notify + public ACE_Event_Handler + + + + + ACE_Reactor_Notify + ACE_Select_Reactor_Notify + + + + ACE_Reactor_Impl + ACE_Select_Reactor_Impl + + + + + void renew + virtual void renew + + + int is_suspended_i + virtual int is_suspended_i + + + void clear_dispatch_mask + virtual void clear_dispatch_mask + + + + + + + + ACE_Reactor_Impl + ACE_Select_Reactor_Impl + + + + + + +#include "ace/Reactor.h" + + + + + + + + ACE_Reactor_Impl + ACE_Select_Reactor_Impl + + + + #include "ace/Reactor_Impl.h" + #include "ace/Select_Reactor_Base.h" + + + + + + + + + ACE_Reactor_Impl + ACE_Select_Reactor_Impl + + + + + + + +REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK +class ACE_Sig_Handler; +class ACE_Sig_Action; +class ACE_Sig_Set; + + + + ACE_Reactor_Notify + ACE_Select_Reactor_Notify + + +virtual + + + + + + + REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK + #include "ace/Countdown_Time.h" + + + + ACE_Reactor_Notify + ACE_Select_Reactor_Notify + + + + + + +#include "ace/Reactor.h" + + + + + + +REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK +#include "ace/Select_Reactor.h" + + +class ACE_Reactor_Impl; +virtual + + +ACE_Reactor_Impl +ACE_Select_Reactor + + + +: public ACE_Reactor_Timer_Interface +#include "ace/Reactor_Timer_Interface.h" + + + + + + +class ACE_Reactor_Timer_Interface; + + + + ACE_Reactor_Timer_Interface + ACE_Reactor + + + + + + ACE_Reactor_Timer_Interface + ACE_Reactor + + + + + + +#include "ace/Reactor_Timer_Interface.h" + + + + + + + + + REACTOR_SPL_COMMENT_INCLUDE_START_HOOK + REACTOR_SPL_COMMENT_INCLUDE_END_HOOK + + + + + REACTOR_SPL_CONSTRUCTOR_COMMENT_HOOK_START + REACTOR_SPL_CONSTRUCTOR_COMMENT_HOOK_END + + + + + REACTOR_SPL_CONSTRUCTOR_COMMENT_HOOK_END + + ACE_NEW (impl, + ACE_Select_Reactor); + + + + + ACE_Reactor_Impl + ACE_Select_Reactor + + + + + + + + REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK + +// Check if this is necessary +#include "ace/Select_Reactor.h" + + + + + + + + + + + TP_Reactor.h + // TP_Reactor.h + + + TP_Reactor.cpp + // TP_Reactor.cpp + + + + + Msg_WFMO_Reactor.cpp + // Msg_WFMO_Reactor.cpp + + + + + WFMO_Reactor.cpp + // WFMO_Reactor.cpp + + + + + Reactor_Impl.cpp + // Reactor_Impl.cpp + + + Reactor_Impl.h + // Reactor_Impl.h + + + + + Dev_Poll_Reactor.cpp + // Dev_Poll_Reactor.cpp + + + + + Priority_Reactor.cpp + // Priority_Reactor.cpp + + + + + Reactor_Timer_Interface.h + // Reactor_Timer_Interface.h + + + Reactor_Timer_Interface.cpp + // Reactor_Timer_Interface.cpp + + + + + + + + + + + + + + +class ACE_Reactor_Impl; +#include "ace/Reactor.h" + + + + + ACE_Reactor_Impl + ACE_Select_Reactor + + + + + + + + +#include "ace/TP_Reactor.h" + + + + ACE_Reactor_Impl + ACE_Select_Reactor + + + + + TAO_REACTOR_SPL_COMMENT_HOOK_START + TAO_REACTOR_SPL_COMMENT_HOOK_END + + + + + + TAO_REACTOR_SPL_COMMENT_HOOK_END + + ACE_NEW_RETURN (impl, + TAO_REACTOR ((ACE_Sig_Handler*)0, + (ACE_Timer_Queue*)0, + 0, + (ACE_Select_Reactor_Notify*)0, + this->reactor_mask_signals_), + 0); + + + + + + + + GUIResource_Factory.cpp + // GUIResource_Factory.cpp + + + GUIResource_Factory.h + // GUIResource_Factory.h + + + + + + + + + + + + ACE_Reactor_Impl + ACE_Select_Reactor + + + + + + + +#include "ace/FlReactor.h" +#include "ace/TkReactor.h" +#include "ace/WFMO_Reactor.h" +#include "ace/TP_Reactor.h" +#include "ace/Msg_WFMO_Reactor.h" + + + ACE_Reactor_Impl + ACE_Select_Reactor + + + + + ace/Select_Reactor.h + ace/Reactor.h + + + + + TAO_ADVANCED_RESOURCE_REACTOR_SPL_COMMENT_HOOK_START + TAO_ADVANCED_RESOURCE_REACTOR_SPL_COMMENT_HOOK_END + + + + + TAO_ADVANCED_RESOURCE_REACTOR_SPL_COMMENT_HOOK_END + + ACE_NEW_RETURN (impl, + TAO_REACTOR ((ACE_Sig_Handler*)0, + (ACE_Timer_Queue*)0, + 0, + (ACE_Select_Reactor_Notify*)0, + this->reactor_mask_signals_), + 0); + + + + + + + + diff --git a/bin/FOCUS/specializations/Reactor_Family/Select_Reactor_ST.spl b/bin/FOCUS/specializations/Reactor_Family/Select_Reactor_ST.spl new file mode 100644 index 00000000000..13e72307183 --- /dev/null +++ b/bin/FOCUS/specializations/Reactor_Family/Select_Reactor_ST.spl @@ -0,0 +1,466 @@ + + + + + + + + + + + + + + + REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK + class ACE_Sig_Handler; + class ACE_Sig_Action; + class ACE_Sig_Set; + + + + REACTOR_SPL_PUBLIC_METHODS_ADD_HOOK + +//These methods needs to be virtual as they are used by +//Select_Reactor_Notify classes which use the base class +virtual ~ACE_Select_Reactor_Impl () {} + +virtual int notify (ACE_Event_Handler *event_handler = 0, + ACE_Reactor_Mask mask = ACE_Event_Handler::EXCEPT_MASK, + ACE_Time_Value * = 0) =0; + +virtual int remove_handler (ACE_Event_Handler *eh, + ACE_Reactor_Mask mask) =0; + +virtual int register_handler (ACE_HANDLE handle, + ACE_Event_Handler *eh, + ACE_Reactor_Mask mask) =0; + + + + +virtual +: public ACE_Reactor_Impl +#include "ace/Reactor_Impl.h" + + + + public ACE_Reactor_Notify + public ACE_Event_Handler + + + + + ACE_Reactor_Notify + ACE_Select_Reactor_Notify + + + + ACE_Reactor_Impl + ACE_Select_Reactor_Impl + + + + + void renew + virtual void renew + + + int is_suspended_i + virtual int is_suspended_i + + + void clear_dispatch_mask + virtual void clear_dispatch_mask + + + + + + + + ACE_Reactor_Impl + ACE_Select_Reactor_Impl + + + + + + +#include "ace/Reactor.h" + + + + + + +REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK +class ACE_Sig_Handler; +class ACE_Sig_Action; +class ACE_Sig_Set; + + + + ACE_Reactor_Notify + ACE_Select_Reactor_Notify + + +virtual + + + + + + + REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK + #include "ace/Countdown_Time.h" + + + + ACE_Reactor_Notify + ACE_Select_Reactor_Notify + + + + + + +#include "ace/Reactor.h" + + + + + + + + ACE_Reactor_Impl + ACE_Select_Reactor_Impl + + + + #include "ace/Reactor_Impl.h" + #include "ace/Select_Reactor_Base.h" + + + + + + + + + ACE_Reactor_Impl + ACE_Select_Reactor_Impl + + + + + + + +REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK +#include "ace/Select_Reactor.h" + + +class ACE_Reactor_Impl; +virtual + + +ACE_Reactor_Impl +ACE_Select_Reactor + + + +: public ACE_Reactor_Timer_Interface +#include "ace/Reactor_Timer_Interface.h" + + + + + + +class ACE_Reactor_Timer_Interface; + + + + ACE_Reactor_Timer_Interface + ACE_Reactor + + + + + + ACE_Reactor_Timer_Interface + ACE_Reactor + + + + + + +#include "ace/Reactor_Timer_Interface.h" + + + + + + + + REACTOR_SPL_COMMENT_INCLUDE_START_HOOK + REACTOR_SPL_COMMENT_INCLUDE_END_HOOK + + + + + REACTOR_SPL_CONSTRUCTOR_COMMENT_HOOK_START + REACTOR_SPL_CONSTRUCTOR_COMMENT_HOOK_END + + + + + REACTOR_SPL_CONSTRUCTOR_COMMENT_HOOK_END + + ACE_NEW (impl, + ACE_Select_Reactor); + + + + + ACE_Reactor_Impl + ACE_Select_Reactor + + + + + + + + REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK + +// Check if this is necessary +#include "ace/Select_Reactor.h" + + + + + + + + + + TAO_REACTOR_SPL_COMMENT_HOOK_START + TAO_REACTOR_SPL_COMMENT_HOOK_END + + + + TAO_REACTOR_SPL_COMMENT_HOOK_END + + typedef ACE_Select_Reactor_T <ACE_Reactor_Token_T < ACE_Noop_Token > > ACE_Select_Reactor; + + + + + + + + + + TP_Reactor.h + // TP_Reactor.h + + + TP_Reactor.cpp + // TP_Reactor.cpp + + + + + Msg_WFMO_Reactor.cpp + // Msg_WFMO_Reactor.cpp + + + + + WFMO_Reactor.cpp + // WFMO_Reactor.cpp + + + + + Reactor_Impl.cpp + // Reactor_Impl.cpp + + + Reactor_Impl.h + // Reactor_Impl.h + + + + + Dev_Poll_Reactor.cpp + // Dev_Poll_Reactor.cpp + + + + + Priority_Reactor.cpp + // Priority_Reactor.cpp + + + + + Reactor_Timer_Interface.h + // Reactor_Timer_Interface.h + + + Reactor_Timer_Interface.cpp + // Reactor_Timer_Interface.cpp + + + + + + + + + + + + + + +class ACE_Reactor_Impl; +#include "ace/Reactor.h" + + + + + ACE_Reactor_Impl + ACE_Select_Reactor + + + + + + + + +#include "ace/TP_Reactor.h" + + + + ACE_Reactor_Impl + ACE_Select_Reactor + + + + + TAO_REACTOR_SPL_COMMENT_HOOK_START + TAO_REACTOR_SPL_COMMENT_HOOK_END + + + + + + TAO_REACTOR_SPL_COMMENT_HOOK_END + + ACE_NEW_RETURN (impl, + TAO_NULL_LOCK_REACTOR ((ACE_Sig_Handler*)0, + (ACE_Timer_Queue*)0, + 0, + (ACE_Select_Reactor_Notify*)0, + this->reactor_mask_signals_), + 0); + + + + + + + + GUIResource_Factory.cpp + // GUIResource_Factory.cpp + + + GUIResource_Factory.h + // GUIResource_Factory.h + + + + + + + + + + + + ACE_Reactor_Impl + ACE_Select_Reactor + + + + + + + +#include "ace/FlReactor.h" +#include "ace/TkReactor.h" +#include "ace/WFMO_Reactor.h" +#include "ace/TP_Reactor.h" +#include "ace/Msg_WFMO_Reactor.h" + + + ACE_Reactor_Impl + ACE_Select_Reactor + + + + + ace/Select_Reactor.h + ace/Reactor.h + + + + + TAO_ADVANCED_RESOURCE_REACTOR_SPL_COMMENT_HOOK_START + TAO_ADVANCED_RESOURCE_REACTOR_SPL_COMMENT_HOOK_END + + + + + TAO_ADVANCED_RESOURCE_REACTOR_SPL_COMMENT_HOOK_END + + ACE_NEW_RETURN (impl, + TAO_NULL_LOCK_REACTOR ((ACE_Sig_Handler*)0, + (ACE_Timer_Queue*)0, + 0, + (ACE_Select_Reactor_Notify*)0, + this->reactor_mask_signals_), + 0); + + + + + + + + diff --git a/bin/FOCUS/specializations/Reactor_Family/TP_Reactor.spl b/bin/FOCUS/specializations/Reactor_Family/TP_Reactor.spl new file mode 100644 index 00000000000..f25c5fe5416 --- /dev/null +++ b/bin/FOCUS/specializations/Reactor_Family/TP_Reactor.spl @@ -0,0 +1,439 @@ + + + + + + + + + + + + + + REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK + class ACE_Sig_Handler; + class ACE_Sig_Action; + class ACE_Sig_Set; + + + +#include "ace/Reactor_Impl.h" +virtual +: public ACE_Reactor_Impl + + + + public ACE_Reactor_Notify + public ACE_Event_Handler + + + + REACTOR_SPL_PUBLIC_METHODS_ADD_HOOK + +//--- How can we devirtualize these methods? +virtual ~ACE_Select_Reactor_Impl () {} + +virtual int notify (ACE_Event_Handler *event_handler = 0, + ACE_Reactor_Mask mask = ACE_Event_Handler::EXCEPT_MASK, + ACE_Time_Value * = 0) = 0; + +virtual int remove_handler (ACE_Event_Handler *eh, + ACE_Reactor_Mask mask) = 0; + +virtual int register_handler (ACE_HANDLE handle, + ACE_Event_Handler *eh, + ACE_Reactor_Mask mask) =0; +//-------------------------------------------- + + + + + ACE_Reactor_Notify + ACE_Select_Reactor_Notify + + + + ACE_Reactor_Impl + ACE_Select_Reactor_Impl + + + + + void renew + virtual void renew + + + int is_suspended_i + virtual int is_suspended_i + + + void clear_dispatch_mask + virtual void clear_dispatch_mask + + + + + + + + ACE_Reactor_Impl + ACE_Select_Reactor_Impl + + + + + + +#include "ace/Reactor.h" + + + + + + +REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK +class ACE_Sig_Handler; +class ACE_Sig_Action; +class ACE_Sig_Set; + + + + ACE_Reactor_Notify + ACE_Select_Reactor_Notify + + + + + + + REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK + #include "ace/Countdown_Time.h" + + + + ACE_Reactor_Notify + ACE_Select_Reactor_Notify + + + + + + + + + ACE_Reactor_Impl + ACE_Select_Reactor_Impl + + + + #include "ace/Reactor_Impl.h" + #include "ace/Select_Reactor_Base.h" + + + + + + + + + ACE_Reactor_Impl + ACE_Select_Reactor_Impl + + + + + + + + + + + + ACE_Reactor_Impl + ACE_TP_Reactor + + + +virtual + + +: public ACE_Reactor_Timer_Interface +#include "ace/Reactor_Timer_Interface.h" + + + + + + +class ACE_Reactor_Timer_Interface; + + + + ACE_Reactor_Timer_Interface + ACE_Reactor + + + + + + ACE_Reactor_Timer_Interface + ACE_Reactor + + + + + + +#include "ace/Reactor_Timer_Interface.h" + + + + + + + + REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK + +// Check if this is necessary +#include "ace/Select_Reactor.h" + + + + + + + + + + ACE_Reactor_Impl + ACE_TP_Reactor + + + + + REACTOR_SPL_COMMENT_INCLUDE_START_HOOK + REACTOR_SPL_COMMENT_INCLUDE_END_HOOK + + + + + REACTOR_SPL_CONSTRUCTOR_COMMENT_HOOK_START + REACTOR_SPL_CONSTRUCTOR_COMMENT_HOOK_END + + + + + REACTOR_SPL_COMMENT_INCLUDE_END_HOOK + #include "ace/TP_Reactor.h" + + + + + REACTOR_SPL_CONSTRUCTOR_COMMENT_HOOK_END + + ACE_NEW (impl, + ACE_TP_Reactor); + + + + + + + + + +virtual + + + + + + + + + REACTOR_SPL_COMMENT_HOOK_START + REACTOR_SPL_COMMENT_HOOK_END + + + + + REACTOR_SPL_COMMENT_HOOK_END + +int +ACE_TP_Reactor::register_handler (int signum, + ACE_Event_Handler *new_sh, + ACE_Sig_Action *new_disp, + ACE_Event_Handler **old_sh, + ACE_Sig_Action *old_disp) +{ + return ACE_Select_Reactor::register_handler (signum, + new_sh, + new_disp, + old_sh, + old_disp); +} + + + + + + + + + +#include "ace/Select_Reactor.h" + + + ACE_Select_Reactor + ACE_TP_Reactor + + + + + REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK + #include "ace/TP_Reactor.h" + + + + + + + + + WFMO_Reactor.cpp + // WFMO_Reactor.cpp + + + + + Reactor_Impl.cpp + // Reactor_Impl.cpp + + + Reactor_Impl.h + // Reactor_Impl.h + + + + + Dev_Poll_Reactor.cpp + // Dev_Poll_Reactor.cpp + + + + + + Msg_WFMO_Reactor.cpp + // Msg_WFMO_Reactor.cpp + + + + + + Priority_Reactor.cpp + // Priority_Reactor.cpp + + + + + Reactor_Timer_Interface.h + // Reactor_Timer_Interface.h + + + Reactor_Timer_Interface.cpp + // Reactor_Timer_Interface.cpp + + + + + + + + + + + + + + ACE_Reactor_Impl + ACE_TP_Reactor + + + + + + + + ACE_Reactor_Impl + ACE_TP_Reactor + + + + + + + + + + + + ACE_Reactor_Impl + ACE_TP_Reactor + + + + + + + + +#include "ace/FlReactor.h" +#include "ace/TkReactor.h" +#include "ace/WFMO_Reactor.h" + +#include "ace/Msg_WFMO_Reactor.h" + + + + ACE_Reactor_Impl + ACE_TP_Reactor + + + + + TAO_ADVANCED_RESOURCE_REACTOR_SPL_COMMENT_HOOK_START + TAO_ADVANCED_RESOURCE_REACTOR_SPL_COMMENT_HOOK_END + + + + + TAO_ADVANCED_RESOURCE_REACTOR_SPL_COMMENT_HOOK_END + + ACE_NEW_RETURN (impl, + ACE_TP_Reactor (ACE::max_handles (), + 1, + (ACE_Sig_Handler*)0, + (ACE_Timer_Queue*)0, + this->reactor_mask_signals_, + ACE_Select_Reactor_Token::LIFO), + 0); + + + + + + + + diff --git a/bin/FOCUS/specializations/Wait_Strategy/Wait_On_Read.spl b/bin/FOCUS/specializations/Wait_Strategy/Wait_On_Read.spl new file mode 100644 index 00000000000..ab76b9c8eef --- /dev/null +++ b/bin/FOCUS/specializations/Wait_Strategy/Wait_On_Read.spl @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + Wait_On_Read.cpp + + + WAIT_STRATEGY_SPL_COPY_HOOK_START + WAIT_STRATEGY_SPL_COPY_HOOK_END + + + TAO_WAIT_STRATEGY_SPL_ADD_HOOK + + + + + + WAIT_STRATEGY_SPL_COPY_HOOK_START + +#include "Wait_On_Read.h" +#include "Transport.h" +#include "Resume_Handle.h" +#include "Synch_Reply_Dispatcher.h" +#include "Client_Strategy_Factory.h" +#include "ORB_Core.h" +#include "ace/Reactor.h" +#include "ace/Countdown_Time.h" + + + + + + TAO_Wait_On_Read + TAO_Wait_Strategy + + + + + + + + + Wait_On_Read.h + // Wait_On_Read.cpp + + + Wait_On_Read.cpp + // Wait_On_Read.cpp + + + + Wait_On_Reactor.h + // Wait_On_Reactor.cpp + + + Wait_On_Reactor.cpp + // Wait_On_Reactor.cpp + + + + Wait_On_Leader_Follower.h + // Wait_On_Leader_Follower.cpp + + + Wait_On_Leader_Follower.cpp + // Wait_On_Leader_Follower.cpp + + + + Wait_On_LF_No_Upcall.h + // Wait_On_LF_No_Upcall.cpp + + + Wait_On_LF_No_Upcall.cpp + // Wait_On_LF_No_Upcall.cpp + + + + + + + -- cgit v1.2.1