diff options
Diffstat (limited to 'src/vppinfra')
-rw-r--r-- | src/vppinfra/tw_timer_template.c | 5 | ||||
-rw-r--r-- | src/vppinfra/tw_timer_template.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/vppinfra/tw_timer_template.c b/src/vppinfra/tw_timer_template.c index c96c329c931..9c9bb977d5e 100644 --- a/src/vppinfra/tw_timer_template.c +++ b/src/vppinfra/tw_timer_template.c @@ -376,6 +376,11 @@ void TW (tw_timer_stop) (TWT (tw_timer_wheel) * tw, u32 handle) pool_put_index (tw->timers, handle); } +int TW (tw_timer_handle_is_free) (TWT (tw_timer_wheel) * tw, u32 handle) +{ + return pool_is_free_index (tw->timers, handle); +} + /** * @brief Update a tw timer * @param tw_timer_wheel_t * tw timer wheel object pointer diff --git a/src/vppinfra/tw_timer_template.h b/src/vppinfra/tw_timer_template.h index b5cdac05506..e581f072f41 100644 --- a/src/vppinfra/tw_timer_template.h +++ b/src/vppinfra/tw_timer_template.h @@ -238,6 +238,7 @@ u32 TW (tw_timer_start) (TWT (tw_timer_wheel) * tw, u32 pool_index, u32 timer_id, u64 interval); void TW (tw_timer_stop) (TWT (tw_timer_wheel) * tw, u32 handle); +int TW (tw_timer_handle_is_free) (TWT (tw_timer_wheel) * tw, u32 handle); void TW (tw_timer_update) (TWT (tw_timer_wheel) * tw, u32 handle, u64 interval); |