eal: get unique thread id
authorCunming Liang <cunming.liang@intel.com>
Tue, 17 Feb 2015 02:08:06 +0000 (10:08 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 24 Feb 2015 19:22:19 +0000 (20:22 +0100)
commitef76436c683424e5308b25e1ea1ab50c219e0c84
treed5c039bd3aff33fa1917f7eac6c12ccbe9b8dca4
parentf8e0f0163abdf566aabf8c28b7670f2fef98f130
eal: get unique thread id

The rte_gettid() wraps the linux and freebsd syscall gettid().
It provides a persistent unique thread id for the calling thread.
It will save the unique id in TLS on the first time.

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_eal/bsdapp/eal/eal_thread.c
lib/librte_eal/common/include/rte_eal.h
lib/librte_eal/linuxapp/eal/eal_thread.c