diff options
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp | 24 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h | 5 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/EC_Multiple/README | 4 |
3 files changed, 16 insertions, 17 deletions
diff --git a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp index d254b7c1773..b94687511fa 100644 --- a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp +++ b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.cpp @@ -16,10 +16,10 @@ #include "tao/ORB_Core.h" #include "ace/Get_Opt.h" -#include "ace/Auto_Ptr.h" #include "ace/Sched_Params.h" #include "ace/OS_NS_errno.h" #include "ace/OS_NS_strings.h" +#include <memory> #if defined (sun) # include <sys/lwp.h> /* for _lwp_self */ @@ -255,7 +255,7 @@ Test_ECG::run (int argc, ACE_TCHAR* argv[]) CosNaming::NamingContext_var naming_context = CosNaming::NamingContext::_narrow (naming_obj.in ()); - auto_ptr<POA_RtecScheduler::Scheduler> scheduler_impl; + std::unique_ptr<POA_RtecScheduler::Scheduler> scheduler_impl; RtecScheduler::Scheduler_var scheduler; switch (this->scheduling_type_) @@ -269,8 +269,8 @@ Test_ECG::run (int argc, ACE_TCHAR* argv[]) case Test_ECG::ss_local: { - auto_ptr<POA_RtecScheduler::Scheduler> auto_scheduler_impl (new ACE_Config_Scheduler); - scheduler_impl = auto_scheduler_impl; + std::unique_ptr<POA_RtecScheduler::Scheduler> auto_scheduler_impl (new ACE_Config_Scheduler); + scheduler_impl = std::move(auto_scheduler_impl); } if (scheduler_impl.get () == 0) return -1; @@ -287,12 +287,12 @@ Test_ECG::run (int argc, ACE_TCHAR* argv[]) sizeof (runtime_infos_1)/sizeof (runtime_infos_1[0]), runtime_infos_1); - auto_ptr<POA_RtecScheduler::Scheduler> auto_scheduler_impl + std::unique_ptr<POA_RtecScheduler::Scheduler> auto_scheduler_impl (new ACE_Runtime_Scheduler (runtime_configs_1_size, runtime_configs_1, runtime_infos_1_size, runtime_infos_1)); - scheduler_impl = auto_scheduler_impl; + scheduler_impl = std::move(auto_scheduler_impl); if (scheduler_impl.get () == 0) return -1; @@ -307,12 +307,12 @@ Test_ECG::run (int argc, ACE_TCHAR* argv[]) sizeof (runtime_infos_2)/sizeof (runtime_infos_2[0]), runtime_infos_2); - auto_ptr<POA_RtecScheduler::Scheduler> auto_scheduler_impl + std::unique_ptr<POA_RtecScheduler::Scheduler> auto_scheduler_impl (new ACE_Runtime_Scheduler (runtime_configs_2_size, runtime_configs_2, runtime_infos_2_size, runtime_infos_2)); - scheduler_impl = auto_scheduler_impl; + scheduler_impl = std::move(auto_scheduler_impl); if (scheduler_impl.get () == 0) return -1; @@ -327,12 +327,12 @@ Test_ECG::run (int argc, ACE_TCHAR* argv[]) sizeof (runtime_infos_3)/sizeof (runtime_infos_3[0]), runtime_infos_3); - auto_ptr<POA_RtecScheduler::Scheduler> auto_scheduler_impl + std::unique_ptr<POA_RtecScheduler::Scheduler> auto_scheduler_impl (new ACE_Runtime_Scheduler (runtime_configs_3_size, runtime_configs_3, runtime_infos_3_size, runtime_infos_3)); - scheduler_impl = auto_scheduler_impl; + scheduler_impl = std::move(auto_scheduler_impl); if (scheduler_impl.get () == 0) return -1; @@ -344,8 +344,8 @@ Test_ECG::run (int argc, ACE_TCHAR* argv[]) "Unknown name <%C> defaulting to " "config scheduler\n", this->lcl_name_.c_str ())); - auto_ptr<POA_RtecScheduler::Scheduler> auto_scheduler_impl (new ACE_Config_Scheduler); - scheduler_impl = auto_scheduler_impl; + std::unique_ptr<POA_RtecScheduler::Scheduler> auto_scheduler_impl (new ACE_Config_Scheduler); + scheduler_impl = std::move(auto_scheduler_impl); if (scheduler_impl.get () == 0) return -1; diff --git a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h index 9ba503ad3fe..c0e92439226 100644 --- a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h +++ b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h @@ -27,6 +27,7 @@ #include "orbsvcs/Channel_Clients_T.h" #include "orbsvcs/Event/EC_Gateway_Sched.h" #include "orbsvcs/CosNamingC.h" +#include <atomic> class Test_ECG; @@ -353,11 +354,11 @@ private: // to setup all the consumers. // The suppliers wait on the condition variable. - ACE_Atomic_Op<TAO_SYNCH_MUTEX,int> running_suppliers_; + std::atomic<int> running_suppliers_; // keep track of how many suppliers are still running so we shutdown // at the right moment. - ACE_Atomic_Op<TAO_SYNCH_MUTEX,int> running_consumers_; + std::atomic<int> running_consumers_; // keep track of how many consumers are still running so we shutdown // at the right moment. diff --git a/TAO/orbsvcs/tests/EC_Multiple/README b/TAO/orbsvcs/tests/EC_Multiple/README index 01009d37e0c..2306ce9e100 100644 --- a/TAO/orbsvcs/tests/EC_Multiple/README +++ b/TAO/orbsvcs/tests/EC_Multiple/README @@ -1,6 +1,4 @@ - - - This test ilustrates how to connect multiple ECs; it has many + This test illustrates how to connect multiple ECs; it has many options and can be configured to run a single EC, two ECs connected through a Gateway, short-circuit the EC, use a global, local or precomputed schedule, etc. |