This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: threads.h implementation issues
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Rich Felker <dalias at libc dot org>
- Cc: Juan Manuel Torres Palma <j dot m dot torrespalma at gmail dot com>, libc-alpha at sourceware dot org
- Date: Mon, 27 Oct 2014 15:36:04 -0700 (PDT)
- Subject: Re: threads.h implementation issues
- Authentication-results: sourceware.org; auth=none
- References: <CAD82F-r6+-rDWuKycWkAX1e_U0rFRh2CkURaigwqMTynSt7yaw at mail dot gmail dot com> <20141027221931 dot GN22465 at brightrain dot aerifal dot cx>
> 3. Cast int->uintptr_t->void*->uintptr_t->int to round-trip the int
> result via a value of type void*. This assumes that any value of
> int can be represented in uintptr_t, and that any value of
> uintptr_t can be represented in void*. I think this is acceptable
> but others may disagree.
That is a valid assumption we make all over the place.
This is the right thing to do.