summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-12-03 05:43:50 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-12-03 05:43:50 +0000
commit4bcd3f14714b3b9930f86d5a14df4b0371abb9ee (patch)
tree7d9b6e3c82d28855ac29ed7d017da9272c0a7bf0
parent8c920144f2e7606fc003f2a0a5d431e3e17435bd (diff)
downloadATCD-4bcd3f14714b3b9930f86d5a14df4b0371abb9ee.tar.gz
*** empty log message ***
-rw-r--r--TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Controller_exec.cpp1
-rw-r--r--TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Pulser.cpp19
2 files changed, 8 insertions, 12 deletions
diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Controller_exec.cpp b/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Controller_exec.cpp
index cd4c3fe091a..3055b14f10a 100644
--- a/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Controller_exec.cpp
+++ b/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Controller_exec.cpp
@@ -5,6 +5,7 @@
#include "ace/High_Res_Timer.h"
#include "ace/Stats.h"
#include "ace/Sample_History.h"
+#include "ace/Env_Value_T.h"
/// Default constructor.
MyImpl::Controller_exec_i::Controller_exec_i ()
diff --git a/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Pulser.cpp b/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Pulser.cpp
index 41ec8e20f67..6f4be265b19 100644
--- a/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Pulser.cpp
+++ b/TAO/CIAO/tests/RTCCM/Priority_Test/Controllers/Pulser.cpp
@@ -46,6 +46,7 @@ PTImpl::Pulser::start (CORBA::Long hertz)
if (hertz == 0 || this->active_ != 0) // Not valid
return -1;
+ this->active_ = 1;
long usec = 1000000 / hertz;
this->tid_ = this->reactor ()->schedule_timer (this,
@@ -53,7 +54,6 @@ PTImpl::Pulser::start (CORBA::Long hertz)
ACE_Time_Value (0, usec),
ACE_Time_Value (0, usec));
- this->active_ = 1;
return 0;
}
@@ -62,10 +62,8 @@ PTImpl::Pulser::stop (void)
{
if (this->active_ == 0) // Not valid.
return -1;
-
- this->reactor ()->cancel_timer (this);
-
- this->active_ = 0;
+ else
+ this->active_ = 0;
return 0;
}
@@ -93,13 +91,10 @@ int
PTImpl::Pulser::handle_timeout (const ACE_Time_Value &,
const void *)
{
- this->pulser_callback_->pulse ();
-
-// ACE_DEBUG ((LM_DEBUG,
-// ACE_TEXT ("[%x] with count #%05d timed out at %d.%d!\n"),
-// this,
-// tv.sec (),
-// tv.usec ()));
+ if (this->active_ == 0)
+ this->reactor ()->cancel_timer (this);
+ else
+ this->pulser_callback_->pulse ();
return 0;
}