[dpdk-dev] [PATCH v4 07/17] eal: add rte_gettid() to acquire unique system tid

2015-02-10 Thread Olivier MATZ
Hi, On 02/10/2015 07:57 AM, Liang, Cunming wrote: >>> +/** >>> + * Get system unique thread id. >>> + * >>> + * @return >>> + * On success, returns the thread ID of calling process. >>> + * It always successful. >>> + */ >>> +static inline int rte_gettid(void) >>> +{ >>> + static RTE_DEFINE_

[dpdk-dev] [PATCH v4 07/17] eal: add rte_gettid() to acquire unique system tid

2015-02-10 Thread Liang, Cunming
> -Original Message- > From: Olivier MATZ [mailto:olivier.matz at 6wind.com] > Sent: Monday, February 09, 2015 4:01 AM > To: Liang, Cunming; dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH v4 07/17] eal: add rte_gettid() to acquire > unique > system tid > >

[dpdk-dev] [PATCH v4 07/17] eal: add rte_gettid() to acquire unique system tid

2015-02-08 Thread Olivier MATZ
Hi, On 02/02/2015 03:02 AM, Cunming Liang wrote: > 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. > > [...] > > +/** > + * A wrap API for syscall gettid. > +

[dpdk-dev] [PATCH v4 07/17] eal: add rte_gettid() to acquire unique system tid

2015-02-02 Thread Cunming Liang
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 --- lib/librte_eal/bsdapp/eal/eal_thread.c | 9 + lib/librte_eal/common/in