From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id 4119E8DAA for ; Wed, 25 Nov 2015 12:32:05 +0100 (CET) Received: by wmww144 with SMTP id w144so176048774wmw.1 for ; Wed, 25 Nov 2015 03:32:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=ylLdEOQ4DVwFldI4RT+wwn9qTWQJkBUemkJf93eI47w=; b=zzMG1kKvB2kZkBxr7FaEoRwc4Gm0I4uNPN5HGK+KI2V+MBNB0OWwsN7pw2WPXkU0Ez n3WWv9B18YG6Jyl0Sqk8pY0ZSsU1WUintcIYSQhh+Uss2tpwGrQjHbzqTuZ/pQUUva7Z 8hbjKPQPMugf7kJl6WCtUOKGr8ZzAzzN+FJ2FXMhQJtwBG7ZZ25A9aj00cpXijxphF5A B6N6Ac048uuHuJ2Es5tRvtNkWJnogonktGjF8SHsh8vx7jKeoFkz/P8KkWZw07ZwiCY4 OdfkkyvVjuD/LuQuWf4h1/I/8Pv3erwVwF1G5X/hpxF6X1iNITIK3ZDvWYRKuh37FxCv OAmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=ylLdEOQ4DVwFldI4RT+wwn9qTWQJkBUemkJf93eI47w=; b=h1/xD1oTp5Kf7op9fxJJi8G4CkephHoZZQ1d43lfWnUL2C21fuqdbbhtLdBxNUyHx4 TksUCg7goIrdpSI7ItGPY9zSMElIxGCC6FC9MAzxqd/SbwSBGSNUp192QrYzDJ2rFO5v ZVhgT5o5o/tGx2+KS7ksygmPLg8G0brFb9X7vMibRzPIG7evuBhiLv5XlsXKd0TdIxDo MiwvqCbc6Bii/6SqJRD7RqTkrfitNcFqvbam8YR2OIBCwBZHvJIlBFVNBWmdJWis5JnN Z27lVk1D0ejV0dVs/NqwVKJeGhF3J4qTQ9w2fCUMdwQD7ZvyYuujL3zz1OHYjTMTZiQG dzQw== X-Gm-Message-State: ALoCoQl72GLRY7/KjRoIuZtQbjFL35ag4Knj47S0mhcDfScuzyL6Pyijxw5csOoH29ZREbyHJ/Ke X-Received: by 10.194.185.234 with SMTP id ff10mr42194164wjc.170.1448451125065; Wed, 25 Nov 2015 03:32:05 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id uq3sm22682157wjc.10.2015.11.25.03.32.04 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 Nov 2015 03:32:04 -0800 (PST) From: Thomas Monjalon To: Ferruh Yigit Date: Wed, 25 Nov 2015 12:30:47 +0100 Message-ID: <1705961.bZ1H56deuc@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20151125112440.GA13407@sivlogin002.ir.intel.com> References: <20151124184755.GA26521@sivlogin002.ir.intel.com> <1544258.6QNHahyajJ@xps13> <20151125112440.GA13407@sivlogin002.ir.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2] 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: Wed, 25 Nov 2015 11:32:05 -0000 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 this feature. > > > + * > > > + * This macro only used for Linux, BSD does direct libc call. > > > + * BSD libc version of function is `pthread_set_name_np()`. > > > + */ > > > +#if defined(__DOXYGEN__) > > > +#define rte_thread_setname(...) pthread_setname_np(__VA_ARGS__) > > > +#endif > > > + > > > +#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) > > > +#if __GLIBC_PREREQ(2, 12) > > > +#define rte_thread_setname(...) pthread_setname_np(__VA_ARGS__) > > > +#else > > > +#define rte_thread_setname(...) 0 > > > +#endif > > > +#endif > > > > OK it is a first (and important) fix. > > EAL is an abstraction for Linux and FreeBSD, so ideally another patch would > > make rte_thread_setname working for BSD too. > > I wasn't sure to do that update, since BSD has nothing with glibc versions. > Do you want me amend this patch to update BSD usage to rte_thread_setname? No, for 2.2, you have fixed the glibc issue, that's enough. BSD support can be another path as it is not a real issue currently.