Async-signal-safe access to __thread variables from dlopen()ed libraries?

Ian Lance Taylor iant@google.com
Wed Oct 2 13:02:00 GMT 2013


On Wed, Oct 2, 2013 at 2:16 AM, Torvald Riegel <triegel@redhat.com> wrote:
> On Fri, 2013-09-20 at 13:52 -0400, Rich Felker wrote:
>> On Fri, Sep 20, 2013 at 01:41:37PM -0400, Carlos O'Donell wrote:
>> > * Discuss the ISO C11 implications.
>> >
>> >   ISO C11 wording in 7.14.1.1 p5:
>>
>> The ISO C text on signal handlers is rather irrelevant.
>
> While you can certainly target POSIX and treat what C defines as
> secondary regarding signal handling, I don't agree that C's definitions
> are irrelevant: If you want portable C11 code, you will rely on what ISO
> C specifies.

Yes.  However, the C11 wording is irrelevant with regard to what glibc
should provide.  glibc is not a portable C11 library.  It's a GNU
library.  At a bare minimum glibc needs to provide POSIX.1 support.
And it's fine for a GNU library to provide more--e.g., glibc provides
__thread variables long before they were in any standard.

Ian



More information about the Libc-alpha mailing list