timer: pause in reset sync
authorRobert Sanford <rsanford2@gmail.com>
Wed, 25 Feb 2015 04:09:47 +0000 (23:09 -0500)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 25 Feb 2015 09:39:42 +0000 (10:39 +0100)
In rte_timer_reset_sync(), insert rte_pause() into loop that waits
for rte_timer_reset() to succeed.

Signed-off-by: Robert Sanford <rsanford2@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_timer/rte_timer.c

index 76c9cae..af33f6d 100644 (file)
@@ -447,7 +447,8 @@ rte_timer_reset_sync(struct rte_timer *tim, uint64_t ticks,
                     rte_timer_cb_t fct, void *arg)
 {
        while (rte_timer_reset(tim, ticks, type, tim_lcore,
-                              fct, arg) != 0);
+                              fct, arg) != 0)
+               rte_pause();
 }
 
 /* Stop the timer associated with the timer handle tim */