This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix C11 conformance issues
On 25/07/2018 12:42, Joseph Myers wrote:
> On Wed, 25 Jul 2018, Adhemerval Zanella wrote:
>
>> I am not familiar with HTL internals, but ISO C required some NPTL
>> internal adjustments:
>
> - The C11 threads functions call __pthread_* internally, so all those
> __pthread_* names needed to exist and, where they called POSIX functions
> internally, they needed to be made to call __* names for those functions
> where that wasn't previously necessary for POSIX namespace reasons.
>
So summarize and assuming the fix for the stdc-predef.h for HURD [1],
ISO C threads support for HTL would require:
- Add the required __pthread_* alias called from C11 threads and
also fix any internal possible linkspace name issue by calling
libpthread __* names.
- Correctly tie the HTL required types with ISO C threads without
adding namespace or linkspace pollution by adding a platform
pthreadtypes-arch.h implementation (not sure if it would require
arch-specific ones since HURD since to support only i686).
- Check if HTL requires some handling of the function pointer
mismatch between ISO C thread thrd_start start and pthread_create.
- Add a wrapper to nanosleep to return syscall return code directly
to use on thrd_sleep.
- Call __sched_yield in thrd_yield.
- Remove hurd specific stdc-predef.h and htl threads.h and make
threads.h the generic one.
[1] https://sourceware.org/ml/libc-alpha/2018-07/msg00835.html