From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id B08898E9F for ; Tue, 24 Nov 2015 15:26:27 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 24 Nov 2015 06:26:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,338,1444719600"; d="scan'208";a="846103953" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 24 Nov 2015 06:26:25 -0800 Received: from sivlogin002.ir.intel.com (sivlogin002.ir.intel.com [10.237.217.37]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id tAOEQPWH017428; Tue, 24 Nov 2015 14:26:25 GMT Received: from sivlogin002.ir.intel.com (localhost [127.0.0.1]) by sivlogin002.ir.intel.com with ESMTP id tAOEQPHd006609; Tue, 24 Nov 2015 14:26:25 GMT Received: (from fyigit@localhost) by sivlogin002.ir.intel.com with œ id tAOEQOso006605; Tue, 24 Nov 2015 14:26:25 GMT X-Authentication-Warning: sivlogin002.ir.intel.com: fyigit set sender to ferruh.yigit@intel.com using -f Date: Tue, 24 Nov 2015 14:26:24 +0000 From: Ferruh Yigit To: Bruce Richardson Message-ID: <20151124142624.GA947@sivlogin002.ir.intel.com> Mail-Followup-To: Bruce Richardson , dev@dpdk.org References: <20151119165935.GA4888@sivlogin002.ir.intel.com> <1447955066-17131-1-git-send-email-ferruh.yigit@intel.com> <20151120122105.GB2528@bricha3-MOBL3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151120122105.GB2528@bricha3-MOBL3> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] eal: fix compile error for old glibc caused by pthread_setname_np()# X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2015 14:26:28 -0000 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 > > --- > > 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