diff options
author | naga <naga@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-08-22 19:48:07 +0000 |
---|---|---|
committer | naga <naga@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-08-22 19:48:07 +0000 |
commit | fdfd464686ed34c9e3498e2ebabdd58915275314 (patch) | |
tree | 63f8c36d276cf15e08fc627857411b02a6ae4679 /TAO/tests/Cubit/COOL/MT_Cubit | |
parent | 18deab4d9d9707e1add5e3078c7c351973b31a92 (diff) | |
download | ATCD-fdfd464686ed34c9e3498e2ebabdd58915275314.tar.gz |
*** empty log message ***
Diffstat (limited to 'TAO/tests/Cubit/COOL/MT_Cubit')
-rw-r--r-- | TAO/tests/Cubit/COOL/MT_Cubit/cubit_i.cpp (renamed from TAO/tests/Cubit/COOL/MT_Cubit/cubit_impl.cpp) | 16 | ||||
-rw-r--r-- | TAO/tests/Cubit/COOL/MT_Cubit/cubit_i.h | 27 | ||||
-rw-r--r-- | TAO/tests/Cubit/COOL/MT_Cubit/cubit_impl.h | 21 |
3 files changed, 43 insertions, 21 deletions
diff --git a/TAO/tests/Cubit/COOL/MT_Cubit/cubit_impl.cpp b/TAO/tests/Cubit/COOL/MT_Cubit/cubit_i.cpp index c9e41141828..baf630d7dc5 100644 --- a/TAO/tests/Cubit/COOL/MT_Cubit/cubit_impl.cpp +++ b/TAO/tests/Cubit/COOL/MT_Cubit/cubit_i.cpp @@ -5,9 +5,25 @@ ACE_RCSID(MT_Cubit, cubit_impl, "$Id$") +Cubit_Impl::Cubit_Impl (Task_State *ts) + :ts_ (ts), + util_started_ (0) +{ +} + CORBA::Octet Cubit_Impl:: cube_octet (CORBA::Octet o, CORBA::Environment &IT_env) { // ACE_DEBUG ((LM_DEBUG, "octet cubed is %d\n", o*o*o)); + if (ts_->run_server_utilization_test_ == 1 && + ts_->utilization_task_started_ == 0 && + this->util_started_ == 0 ) + { + this->util_started_ = 1; + ts_->barrier_->wait (); + } + + ts_->loop_count_++; + return (CORBA::Octet) (o * o * o); } diff --git a/TAO/tests/Cubit/COOL/MT_Cubit/cubit_i.h b/TAO/tests/Cubit/COOL/MT_Cubit/cubit_i.h new file mode 100644 index 00000000000..77eecdbbd10 --- /dev/null +++ b/TAO/tests/Cubit/COOL/MT_Cubit/cubit_i.h @@ -0,0 +1,27 @@ +// $Id$ + +#ifndef cubit_ih +#define cubit_ih + +#include <corba/cool.H> +#include "cubit.H" +#include "Task_Client.h" + +class Cubit_Impl { +public: + Cubit_Impl (Task_State *ts); + virtual CORBA_Octet cube_octet (CORBA_Octet o, CORBA_Environment &IT_env=_environment); + virtual CORBA_Short cube_short (CORBA_Short s, CORBA_Environment &IT_env=_environment); + virtual CORBA_Long cube_long (CORBA_Long l, CORBA_Environment &IT_env=_environment); + virtual Cubit::Many cube_struct (const Cubit::Many& values, CORBA_Environment &IT_env=_environment); + virtual Cubit::oneof cube_union (const Cubit::oneof& values, CORBA_Environment &IT_env=_environment); + virtual void please_exit (CORBA_Environment &IT_env=_environment); + +private: + Task_State *ts_; + //pointer to the task state + int util_started_; + // flag to indicate utilization test has started +}; + +#endif diff --git a/TAO/tests/Cubit/COOL/MT_Cubit/cubit_impl.h b/TAO/tests/Cubit/COOL/MT_Cubit/cubit_impl.h deleted file mode 100644 index 20cf27424af..00000000000 --- a/TAO/tests/Cubit/COOL/MT_Cubit/cubit_impl.h +++ /dev/null @@ -1,21 +0,0 @@ -// $Id$ - -#ifndef cubit_ih -#define cubit_ih - -#include <corba/cool.H> -#include "cubit.H" - -class Cubit_Impl { - -public: - virtual CORBA_Octet cube_octet (CORBA_Octet o, CORBA_Environment &IT_env=_environment); - virtual CORBA_Short cube_short (CORBA_Short s, CORBA_Environment &IT_env=_environment); - virtual CORBA_Long cube_long (CORBA_Long l, CORBA_Environment &IT_env=_environment); - virtual Cubit::Many cube_struct (const Cubit::Many& values, CORBA_Environment &IT_env=_environment); - virtual Cubit::oneof cube_union (const Cubit::oneof& values, CORBA_Environment &IT_env=_environment); - virtual void please_exit (CORBA_Environment &IT_env=_environment); -}; - - -#endif |