aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/tw_timer_template.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-10-17 13:32:25 +0200
committerDave Barach <openvpp@barachs.net>2020-10-17 21:01:42 +0000
commitdae1c7ed38e9f7a86e66f3674de62778cc981331 (patch)
treec84fd7a94e1249233d5533e15d54bef52582ee4c /src/vppinfra/tw_timer_template.c
parentada5bbf3303e8fb6f53ff39e6074ae820457224d (diff)
vppinfra: explicitly export symbols
Type: improvement Change-Id: I57a9f85f7df1fc48656b72592349f4c544302f77 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/tw_timer_template.c')
-rw-r--r--src/vppinfra/tw_timer_template.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/vppinfra/tw_timer_template.c b/src/vppinfra/tw_timer_template.c
index 174ffaceb47..97c70b223ce 100644
--- a/src/vppinfra/tw_timer_template.c
+++ b/src/vppinfra/tw_timer_template.c
@@ -292,7 +292,7 @@ timer_add (TWT (tw_timer_wheel) * tw, TWT (tw_timer) * t, u64 interval)
* @param u64 interval timer interval in ticks
* @returns handle needed to cancel the timer
*/
-u32
+__clib_export u32
TW (tw_timer_start) (TWT (tw_timer_wheel) * tw, u32 user_id, u32 timer_id,
u64 interval)
{
@@ -349,7 +349,7 @@ int TW (scan_for_handle) (TWT (tw_timer_wheel) * tw, u32 handle)
* @param tw_timer_wheel_t * tw timer wheel object pointer
* @param u32 handle timer cancellation returned by tw_timer_start
*/
-void TW (tw_timer_stop) (TWT (tw_timer_wheel) * tw, u32 handle)
+__clib_export void TW (tw_timer_stop) (TWT (tw_timer_wheel) * tw, u32 handle)
{
TWT (tw_timer) * t;
@@ -376,7 +376,8 @@ 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)
+__clib_export int
+TW (tw_timer_handle_is_free) (TWT (tw_timer_wheel) * tw, u32 handle)
{
return pool_is_free_index (tw->timers, handle);
}
@@ -387,8 +388,8 @@ int TW (tw_timer_handle_is_free) (TWT (tw_timer_wheel) * tw, u32 handle)
* @param u32 handle timer returned by tw_timer_start
* @param u32 interval timer interval in ticks
*/
-void TW (tw_timer_update) (TWT (tw_timer_wheel) * tw, u32 handle,
- u64 interval)
+__clib_export void
+TW (tw_timer_update) (TWT (tw_timer_wheel) * tw, u32 handle, u64 interval)
{
TWT (tw_timer) * t;
t = pool_elt_at_index (tw->timers, handle);
@@ -403,7 +404,7 @@ void TW (tw_timer_update) (TWT (tw_timer_wheel) * tw, u32 handle,
* expired timer handles. The callback is optional.
* @param f64 timer_interval_in_seconds
*/
-void
+__clib_export void
TW (tw_timer_wheel_init) (TWT (tw_timer_wheel) * tw,
void *expired_timer_callback,
f64 timer_interval_in_seconds, u32 max_expirations)
@@ -450,7 +451,7 @@ TW (tw_timer_wheel_init) (TWT (tw_timer_wheel) * tw,
* @brief Free a tw timer wheel template instance
* @param tw_timer_wheel_t * tw timer wheel object pointer
*/
-void TW (tw_timer_wheel_free) (TWT (tw_timer_wheel) * tw)
+__clib_export void TW (tw_timer_wheel_free) (TWT (tw_timer_wheel) * tw)
{
int i, j;
tw_timer_wheel_slot_t *ts;
@@ -810,13 +811,14 @@ static inline
return callback_vector;
}
-u32 *TW (tw_timer_expire_timers) (TWT (tw_timer_wheel) * tw, f64 now)
+__clib_export u32 *TW (tw_timer_expire_timers) (TWT (tw_timer_wheel) * tw,
+ f64 now)
{
return TW (tw_timer_expire_timers_internal) (tw, now, 0 /* no vector */ );
}
-u32 *TW (tw_timer_expire_timers_vec) (TWT (tw_timer_wheel) * tw, f64 now,
- u32 * vec)
+__clib_export u32 *TW (tw_timer_expire_timers_vec) (TWT (tw_timer_wheel) * tw,
+ f64 now, u32 * vec)
{
return TW (tw_timer_expire_timers_internal) (tw, now, vec);
}
@@ -829,7 +831,8 @@ u32 *TW (tw_timer_expire_timers_vec) (TWT (tw_timer_wheel) * tw, f64 now,
* when timers are removed from fast wheel slots.
*/
-u32 TW (tw_timer_first_expires_in_ticks) (TWT (tw_timer_wheel) * tw)
+__clib_export u32
+TW (tw_timer_first_expires_in_ticks) (TWT (tw_timer_wheel) * tw)
{
u32 first_expiring_index, fast_ring_index;
i32 delta;