timer: fix corruption with reset
authorHiroyuki Mikita <h.mikita89@gmail.com>
Sun, 17 Jul 2016 18:08:00 +0000 (03:08 +0900)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 25 Jul 2016 15:55:12 +0000 (17:55 +0200)
commit20d159f2054383c46529e301aac723a823c670cb
tree096f5d6e4739135d500ab77d79617099dcecdb06
parenta829d41f9dd286c70e1bef26aca666473fde74fb
timer: fix corruption with reset

When timer_cb resets another running timer on the same lcore,
the list of expired timers is chained to the pending-list.
This commit prevents a running timer from being reset
by not its own timer_cb.

Fixes: a4b7a5a45cf5 ("timer: fix race condition")

Signed-off-by: Hiroyuki Mikita <h.mikita89@gmail.com>
Acked-by: Robert Sanford <rsanford@akamai.com>
lib/librte_timer/rte_timer.c