This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v8 5/8] nptl: Add C11 threads tss_* functions
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: Florian Weimer <fweimer at redhat dot com>, libc-alpha at sourceware dot org
- Date: Thu, 12 Jul 2018 17:32:16 -0300
- Subject: Re: [PATCH v8 5/8] nptl: Add C11 threads tss_* functions
- References: <1517591084-11347-1-git-send-email-adhemerval.zanella@linaro.org> <1517591084-11347-6-git-send-email-adhemerval.zanella@linaro.org> <542a0078-8a10-b0be-fbf7-ae3f8bece155@redhat.com>
On 12/07/2018 13:48, Florian Weimer wrote:
> On 02/02/2018 06:04 PM, Adhemerval Zanella wrote:
>> diff --git a/sysdeps/nptl/threads.h b/sysdeps/nptl/threads.h
>> index eb89b0a..6a807ee 100644
>> --- a/sysdeps/nptl/threads.h
>> +++ b/sysdeps/nptl/threads.h
>> @@ -28,6 +28,10 @@ __BEGIN_DECLS
>> #include <bits/types/struct_timespec.h>
>> #define ONCE_FLAG_INIT 0
>> +#define thread_local _Thread_local
>
> This needs a __cplusplus conditional. _Thread_local does not exist in C++. The macro has to be defined to thread_local starting with C++11.
I think we can just not define it for C++, not really checking which
version is being used.