* Atomics in C++11
@ 2019-09-20 12:32 Nicholas Krause
2019-09-20 20:09 ` Jason Merrill
0 siblings, 1 reply; 5+ messages in thread
From: Nicholas Krause @ 2019-09-20 12:32 UTC (permalink / raw)
To: gcc
Greetings,
I was wondering if its possible to use the C11 atomics library for
multithreading
GCC. Not sure if its a good idea due to concerns about older plaforms
not having
a C11 supported libraries or compiler.
If not then the best way is pthreads key support and other posix thread
supports.
Thanks,
Nick
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Atomics in C++11
2019-09-20 12:32 Atomics in C++11 Nicholas Krause
@ 2019-09-20 20:09 ` Jason Merrill
2019-09-20 20:11 ` Nicholas Krause
0 siblings, 1 reply; 5+ messages in thread
From: Jason Merrill @ 2019-09-20 20:09 UTC (permalink / raw)
To: Nicholas Krause; +Cc: gcc Mailing List
On Fri, Sep 20, 2019 at 8:32 AM Nicholas Krause <xerofoify@gmail.com> wrote:
> I was wondering if its possible to use the C11 atomics library for
> multithreading
>
> GCC. Not sure if its a good idea due to concerns about older plaforms
> not having a C11 supported libraries or compiler.
I've been wondering if it's time to move to C++11 in general, since
we've had compilers with C++11 support for more than 5 years at this
point.
Jason
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Atomics in C++11
2019-09-20 20:09 ` Jason Merrill
@ 2019-09-20 20:11 ` Nicholas Krause
2019-09-20 20:44 ` Joel Sherrill
0 siblings, 1 reply; 5+ messages in thread
From: Nicholas Krause @ 2019-09-20 20:11 UTC (permalink / raw)
To: Jason Merrill; +Cc: gcc Mailing List, giuliano.belinassi
On 9/20/19 4:09 PM, Jason Merrill wrote:
> On Fri, Sep 20, 2019 at 8:32 AM Nicholas Krause <xerofoify@gmail.com> wrote:
>> I was wondering if its possible to use the C11 atomics library for
>> multithreading
>>
>> GCC. Not sure if its a good idea due to concerns about older plaforms
>> not having a C11 supported libraries or compiler.
> I've been wondering if it's time to move to C++11 in general, since
> we've had compilers with C++11 support for more than 5 years at this
> point.
>
> Jason
>
Jason,
It's up to the community at large but both me and the other student who
is CCed
on this work would find it useful. He wants to use TLS for certain
structures and
functions to be doubled per thread for no locking e.t.c. and ease of
programming.
He can add his comments if need be,
Nick
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Atomics in C++11
2019-09-20 20:11 ` Nicholas Krause
@ 2019-09-20 20:44 ` Joel Sherrill
2019-09-20 20:55 ` Nicholas Krause
0 siblings, 1 reply; 5+ messages in thread
From: Joel Sherrill @ 2019-09-20 20:44 UTC (permalink / raw)
To: Nicholas Krause; +Cc: Jason Merrill, GCC, giuliano.belinassi
On Fri, Sep 20, 2019, 3:12 PM Nicholas Krause <xerofoify@gmail.com> wrote:
>
> On 9/20/19 4:09 PM, Jason Merrill wrote:
> > On Fri, Sep 20, 2019 at 8:32 AM Nicholas Krause <xerofoify@gmail.com>
> wrote:
> >> I was wondering if its possible to use the C11 atomics library for
> >> multithreading
> >>
> >> GCC. Not sure if its a good idea due to concerns about older plaforms
> >> not having a C11 supported libraries or compiler.
> > I've been wondering if it's time to move to C++11 in general, since
> > we've had compilers with C++11 support for more than 5 years at this
> > point.
> >
> > Jason
> >
> Jason,
>
> It's up to the community at large but both me and the other student who
> is CCed
>
> on this work would find it useful. He wants to use TLS for certain
> structures and
>
> functions to be doubled per thread for no locking e.t.c. and ease of
> programming.
>
When I reviewed TLS support for all RTEMS targets, it wasn't clear that TLS
ABI is defined for all supported GCC architectures or that it was
universally supported by the backends.
I'm not questioning the value of TLS. I'm just wanting to make sure all GCC
targets actually support TLS.
I may have missed a default generic implementation. It is really hard to
find ABI info for all pro processors.
I would be thrilled to learn I missed the default generic implementation.
This would make supporting it across the 18 architectures RTEMS supports
much easier. :)
>
>
> He can add his comments if need be,
>
> Nick
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Atomics in C++11
2019-09-20 20:44 ` Joel Sherrill
@ 2019-09-20 20:55 ` Nicholas Krause
0 siblings, 0 replies; 5+ messages in thread
From: Nicholas Krause @ 2019-09-20 20:55 UTC (permalink / raw)
To: joel; +Cc: Jason Merrill, GCC, giuliano.belinassi
On 9/20/19 4:43 PM, Joel Sherrill wrote:
> On Fri, Sep 20, 2019, 3:12 PM Nicholas Krause <xerofoify@gmail.com> wrote:
>
>> On 9/20/19 4:09 PM, Jason Merrill wrote:
>>> On Fri, Sep 20, 2019 at 8:32 AM Nicholas Krause <xerofoify@gmail.com>
>> wrote:
>>>> I was wondering if its possible to use the C11 atomics library for
>>>> multithreading
>>>>
>>>> GCC. Not sure if its a good idea due to concerns about older plaforms
>>>> not having a C11 supported libraries or compiler.
>>> I've been wondering if it's time to move to C++11 in general, since
>>> we've had compilers with C++11 support for more than 5 years at this
>>> point.
>>>
>>> Jason
>>>
>> Jason,
>>
>> It's up to the community at large but both me and the other student who
>> is CCed
>>
>> on this work would find it useful. He wants to use TLS for certain
>> structures and
>>
>> functions to be doubled per thread for no locking e.t.c. and ease of
>> programming.
>>
> When I reviewed TLS support for all RTEMS targets, it wasn't clear that TLS
> ABI is defined for all supported GCC architectures or that it was
> universally supported by the backends.
>
> I'm not questioning the value of TLS. I'm just wanting to make sure all GCC
> targets actually support TLS.
>
> I may have missed a default generic implementation. It is really hard to
> find ABI info for all pro processors.
>
> I would be thrilled to learn I missed the default generic implementation.
> This would make supporting it across the 18 architectures RTEMS supports
> much easier. :)
Seems its using IA-64 ABI as reported in a older manual here:
https://gcc.gnu.org/onlinedocs/gcc-3.3/gcc/Thread-Local.html
Nick
>>
>> He can add his comments if need be,
>>
>> Nick
>>
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-09-20 20:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-20 12:32 Atomics in C++11 Nicholas Krause
2019-09-20 20:09 ` Jason Merrill
2019-09-20 20:11 ` Nicholas Krause
2019-09-20 20:44 ` Joel Sherrill
2019-09-20 20:55 ` Nicholas Krause
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).