[dpdk-dev] [PATCH v2] eal: fix compile error for old glibc caused by pthread_setname_np()

2015-11-25 Thread Thomas Monjalon
2015-11-25 08:51, Roger B. Melton: > Have you thought about a way to set thread name when glibc < 2.12. I > also ran into the problem recently and played around with prctl() > (Linux) to set thread (process) name. e.g. > > ret = prctl(PR_SET_NAME,,0,0,0); > > > There are 2 issues I

[dpdk-dev] [PATCH v2] eal: fix compile error for old glibc caused by pthread_setname_np()

2015-11-25 Thread Thomas Monjalon
2015-11-25 11:13, Ferruh Yigit: > Fixes: 67b6d3039e9e ("eal: set name to threads") > > pthread_setname_np() function added in glibc 2.12, using this function > in older glibc versions cause compile error: > error: implicit declaration of function "pthread_setname_np" > > This patch adds

[dpdk-dev] [PATCH v2] eal: fix compile error for old glibc caused by pthread_setname_np()

2015-11-25 Thread Thomas Monjalon
2015-11-25 11:24, Ferruh Yigit: > On Wed, Nov 25, 2015 at 12:18:02PM +0100, Thomas Monjalon wrote: > > 2015-11-25 11:13, Ferruh Yigit: > > > +/** > > > + * Set thread names. > > > + * > > > + * Macro to wrap `pthread_setname_np()` with a glibc version check. > > > + * Only glibc >= 2.12 supports

[dpdk-dev] [PATCH v2] eal: fix compile error for old glibc caused by pthread_setname_np()

2015-11-25 Thread Thomas Monjalon
2015-11-25 11:13, Ferruh Yigit: > +/** > + * Set thread names. > + * > + * Macro to wrap `pthread_setname_np()` with a glibc version check. > + * Only glibc >= 2.12 supports this feature. > + * > + * This macro only used for Linux, BSD does direct libc call. > + * BSD libc version of function is

[dpdk-dev] [PATCH v2] eal: fix compile error for old glibc caused by pthread_setname_np()

2015-11-25 Thread Ferruh Yigit
On Wed, Nov 25, 2015 at 12:18:02PM +0100, Thomas Monjalon wrote: > 2015-11-25 11:13, Ferruh Yigit: > > +/** > > + * Set thread names. > > + * > > + * Macro to wrap `pthread_setname_np()` with a glibc version check. > > + * Only glibc >= 2.12 supports this feature. > > + * > > + * This macro only

[dpdk-dev] [PATCH v2] eal: fix compile error for old glibc caused by pthread_setname_np()

2015-11-25 Thread Ferruh Yigit
Fixes: 67b6d3039e9e ("eal: set name to threads") pthread_setname_np() function added in glibc 2.12, using this function in older glibc versions cause compile error: error: implicit declaration of function "pthread_setname_np" This patch adds "rte_thread_setname" macro and set it according glibc

[dpdk-dev] [PATCH v2] eal: fix compile error for old glibc caused by pthread_setname_np()

2015-11-25 Thread Roger B. Melton
On 11/25/15 9:03 AM, Thomas Monjalon wrote: > 2015-11-25 08:51, Roger B. Melton: >> Have you thought about a way to set thread name when glibc < 2.12. I >> also ran into the problem recently and played around with prctl() >> (Linux) to set thread (process) name. e.g. >> >> ret =

[dpdk-dev] [PATCH v2] eal: fix compile error for old glibc caused by pthread_setname_np()

2015-11-25 Thread Roger B. Melton
> +/** > + * Set thread names. > + * > + * Macro to wrap `pthread_setname_np()` with a glibc version check. > + * Only glibc >= 2.12 supports this feature. > + * > + * This macro only used for Linux, BSD does direct libc call. > + * BSD libc version of function is `pthread_set_name_np()`. > + */