timer: support non-EAL thread
authorCunming Liang <cunming.liang@intel.com>
Tue, 17 Feb 2015 02:08:16 +0000 (10:08 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 24 Feb 2015 19:22:52 +0000 (20:22 +0100)
commit6295e793aa947beb130c1761aabb8cc3b78bef7b
tree2702cd1771ea4fab9aa7c7542119ce01fb98eaf0
parentca2e2dab079a98f105c8e73ebaf1a27e246597f8
timer: support non-EAL thread

Allow to setup timers only for EAL (lcore) threads (__lcore_id < MAX_LCORE_ID).
E.g. – dynamically created thread will be able to reset/stop timer for lcore thread,
but it will be not allowed to setup timer for itself or another non-lcore thread.
rte_timer_manage() for non-lcore thread would simply do nothing and return straightway.

Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
lib/librte_timer/rte_timer.c
lib/librte_timer/rte_timer.h