timer: optimize for empty case
authorStephen Hemminger <shemminger@vyatta.com>
Thu, 30 May 2013 17:12:36 +0000 (17:12 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 17 Sep 2013 12:09:22 +0000 (14:09 +0200)
commit3778059a51fcbc6b989ca7503a3ff89f6945ddd2
tree5b266052fafc45955984706492eca537db9e83b1
parent6286101324294f7922f0268007252d1f008c49e4
timer: optimize for empty case

In many application there are no timers queued, and the call to
rte_timer_managecan be optimized in that case avoid reading HPET and
lock overhead.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Reviewed-by: Vincent Jardin <vincent.jardin@6wind.com>
lib/librte_timer/rte_timer.c