diff options
Diffstat (limited to 'TAO/tests/LongUpcalls/Controller.cpp')
-rw-r--r-- | TAO/tests/LongUpcalls/Controller.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/TAO/tests/LongUpcalls/Controller.cpp b/TAO/tests/LongUpcalls/Controller.cpp new file mode 100644 index 00000000000..94008f0a364 --- /dev/null +++ b/TAO/tests/LongUpcalls/Controller.cpp @@ -0,0 +1,44 @@ +// +// $Id$ +// +#include "Controller.h" + +ACE_RCSID(LongUpcalls, Controller, "$Id$") + +Controller::Controller (void) + : start_count_ (0) + , finish_count_ (0) +{ +} + +void +Controller::dump_results () +{ + ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); + if (this->start_count_ != this->finish_count_) + { + ACE_ERROR ((LM_ERROR, + "ERROR - mismatched count! (%d,%d)\n", + this->start_count_, this->finish_count_)); + } +} + +void +Controller::worker_started (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); + this->start_count_++; + + // ACE_DEBUG ((LM_DEBUG, "Received worker start report\n")); +} + +void +Controller::worker_finished (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_); + this->finish_count_++; + + // ACE_DEBUG ((LM_DEBUG, "Received worker completion report\n")); +} |