[PATCH v8 1/8] nptl: Add C11 threads thrd_* functions
Florian Weimer
fweimer@redhat.com
Thu Jul 12 19:35:00 GMT 2018
On 07/12/2018 09:32 PM, Adhemerval Zanella wrote:
>
>
> On 12/07/2018 14:52, Adhemerval Zanella wrote:
>>
>>
>> On 12/07/2018 13:46, Florian Weimer wrote:
>>> On 02/02/2018 06:04 PM, Adhemerval Zanella wrote:
>>>> +int
>>>> +thrd_join (thrd_t thr, int *res)
>>>> +{
>>>> +Â void *pthread_res;
>>>> +Â int err_code = __pthread_join (thr, &pthread_res);
>>>> +Â if (res)
>>>> +Â Â *res = (int)((uintptr_t) pthread_res);
>>>> +
>>>> +Â return thrd_err_map (err_code);
>>>> +}
>>>
>>> Slight inconsistency with intptr_t above.
>>
>> Indeed, it seems there is no need to cast.
>
> In fact the cast this construction is still required, since the pthread_join
> returned value might have a different size of the expected c11 thrd_join.
I meant the inconsistency between intptr_t and uintptr_t.
Florian
More information about the Libc-alpha
mailing list