[dpdk-dev] [PATCH] eal: fix compile error for old glibc caused by pthread_setname_np()#
Ferruh Yigit
ferruh.yigit at intel.com
Tue Nov 24 15:26:24 CET 2015
On Fri, Nov 20, 2015 at 12:21:05PM +0000, Bruce Richardson wrote:
> On Thu, Nov 19, 2015 at 05:44:26PM +0000, Ferruh Yigit wrote:
> > 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 >= 2.12 check, thread naming disabled for older glibc versions,
> > glibc versions that support "pthread_setname_np" will keep using this
> > function.
> >
> > Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
> > ---
> > examples/tep_termination/main.c | 2 +-
> > examples/vhost/main.c | 2 +-
> > examples/vhost_xen/main.c | 2 +-
> > lib/librte_eal/common/eal_thread.h | 6 ++++++
> > lib/librte_eal/linuxapp/eal/eal.c | 2 +-
> > lib/librte_eal/linuxapp/eal/eal_interrupts.c | 2 +-
> > lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c | 2 +-
> > lib/librte_eal/linuxapp/eal/eal_timer.c | 2 +-
> > 8 files changed, 13 insertions(+), 7 deletions(-)
> >
> I only see changes to linux files above. Does this not also have an implication
> for bsd too?
>
BSD is not effected from this defect since it doesn't use glibc,
equivalent BSD libc function pthread_set_name_np() is 10+ years old...
thanks,
ferruh
More information about the dev
mailing list