On Wed, 29 Aug 2018 15:09:47 +0100 "Burakov, Anatoly" <anatoly.bura...@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.bura...@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.