From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 69045231E for ; Thu, 30 Aug 2018 11:13:36 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Aug 2018 02:13:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,306,1531810800"; d="scan'208";a="66289610" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.148]) ([10.237.220.148]) by fmsmga007.fm.intel.com with ESMTP; 30 Aug 2018 02:13:34 -0700 To: Stephen Hemminger Cc: Bruce Richardson , dev@dpdk.org, dpdk@stormmq.com References: <4f7ac27b4fe1561fd3e3358a89f89ce025a7a128.1535543250.git.anatoly.burakov@intel.com> <20180829123926.GB39260@bricha3-MOBL.ger.corp.intel.com> <8f3e6994-f509-c885-7f3c-6e791d04dee3@intel.com> <20180829094703.392988fc@xeon-e3> From: "Burakov, Anatoly" Message-ID: <7880264c-e349-d959-9b04-2d3070cd0ea0@intel.com> Date: Thu, 30 Aug 2018 10:13:33 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180829094703.392988fc@xeon-e3> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 7/7] eal: improve musl compatibility X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2018 09:13:36 -0000 On 29-Aug-18 5:47 PM, Stephen Hemminger wrote: > On Wed, 29 Aug 2018 15:09:47 +0100 > "Burakov, Anatoly" wrote: > >> On 29-Aug-18 1:39 PM, Bruce Richardson wrote: >>> On Wed, Aug 29, 2018 at 12:56:21PM +0100, Anatoly Burakov wrote: >>>> Musl complains about pthread id being of wrong size. Fix it by >>>> casting to 64-bit and printing 64-bit hex unconditionally. >>>> >>>> Signed-off-by: Anatoly Burakov >>>> --- >>> Given that on linux pthread_t is a pointer type, will this not give other >>> warnings of casting from pointer to integer of a different type when >>> compiling 32-bit? For safety I suggest casting to long or uintptr_t >>> instead, to ensure we always get an int of the right size. >>> >>> /Bruce >>> >> >> Sure, will fix. >> >> -- >> Thanks, >> Anatoly > > Maybe use gettid() to get thread id which is actually way more useful > than the pointer value. Of course, glibc doesn't want to provide a syscall > wrapper for this. > > We have rte_gettid() call. -- Thanks, Anatoly