summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2018-06-23 17:17:44 -0400
committerSteve Huston <shuston@riverace.com>2018-06-23 17:17:44 -0400
commite9d099f89c9b05afcf945d3bcaaaa26bc56bfd82 (patch)
tree7c6bc653bc11b6e4a981e8996891294c7575fc20
parent1ebf6eeb6edcf9c75ff84cce11602e37b904eaa3 (diff)
downloadATCD-e9d099f89c9b05afcf945d3bcaaaa26bc56bfd82.tar.gz
Remove unused member max_per_spoke_; free allocated node if it can not be scheduled
-rw-r--r--ACE/ace/Timer_Wheel_T.cpp4
-rw-r--r--ACE/ace/Timer_Wheel_T.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/ACE/ace/Timer_Wheel_T.cpp b/ACE/ace/Timer_Wheel_T.cpp
index efe3b1317f2..951225e8e98 100644
--- a/ACE/ace/Timer_Wheel_T.cpp
+++ b/ACE/ace/Timer_Wheel_T.cpp
@@ -423,6 +423,10 @@ ACE_Timer_Wheel_T<TYPE, FUNCTOR, ACE_LOCK, TIME_POLICY>::schedule_i (const TYPE&
n->set (type, act, future_time, interval, 0, 0, id);
this->schedule_i (n, spoke, future_time);
}
+ else
+ {
+ this->free_node (n);
+ }
return id;
}
diff --git a/ACE/ace/Timer_Wheel_T.h b/ACE/ace/Timer_Wheel_T.h
index 2e55b1bdf49..2a183dc8237 100644
--- a/ACE/ace/Timer_Wheel_T.h
+++ b/ACE/ace/Timer_Wheel_T.h
@@ -202,8 +202,6 @@ private:
u_int spoke_count_;
/// Number of timer_id bits used for the spoke
int spoke_bits_;
- /// Maximum number of timers per spoke
- u_int max_per_spoke_;
/// Resolution (in microsoconds) of the timing wheel.
int res_bits_;
/// Index of the list with the earliest time