[dpdk-dev] [PATCH 7/7] eal: improve musl compatibility

Burakov, Anatoly anatoly.burakov at intel.com
Thu Aug 30 11:13:33 CEST 2018


On 29-Aug-18 5:47 PM, Stephen Hemminger wrote:
> On Wed, 29 Aug 2018 15:09:47 +0100
> "Burakov, Anatoly" <anatoly.burakov at intel.com> 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 <anatoly.burakov at intel.com>
>>>> ---
>>> 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


More information about the dev mailing list