c++11 std::atomic

Mikhail Svetkin mikhail.svetkin at gmail.com
Wed Jul 12 12:13:07 UTC 2017


I updated RSB and RTEMS, but i had the same problem.

arm-rtems4.12-gcc -v
(gcc version 7.1.0 20170502 (RTEMS 4.12, RSB
f3b8da031e42d126afd94d17582123f66b78a68, Newlib 2.5.0.20170623) (GCC
rtems-git (e19da87ad706bf79fa0e22f1f7d68e21bca2e296)

Also i tried this example on sparc simulator and it's ok.


2017-07-12 14:13 GMT+05:00 Mikhail Svetkin <mikhail.svetkin at gmail.com>:

> Thanks!
> I will try.
>
> 2017-07-12 14:05 GMT+05:00 Sebastian Huber <sebastian.huber at embedded-
> brains.de>:
>
>> Hello Mikhail,
>>
>> On 12/07/17 10:59, Mikhail Svetkin wrote:
>>
>>> Hi all,
>>>
>>> Does RTEMS support c++11 std::atomic?
>>>
>>
>> yes, this is fully supported including libatomic from GCC.
>>
>>
>>> I've tried this example on ARMv7 in RTEMS 4.12(latest master).
>>>
>>> nt main() {
>>>   std::atomic<int> val;
>>>   val.store(0);
>>>   std::cout « "val:" « val.load() « std::endl;
>>>   val++;  // program is not responding
>>>
>>
>> I guess this problem is related to the latest tool chain changes which
>> made an ABI incompatible change in the Newlib struct _reent. Please remove
>> the previous RTEMS 4.12 installation and update the tool chain via the RSB.
>> Then update to the latest RTEMS master.
>>
>> --
>> Sebastian Huber, embedded brains GmbH
>>
>> Address : Dornierstr. 4, D-82178 Puchheim, Germany
>> Phone   : +49 89 189 47 41-16
>> Fax     : +49 89 189 47 41-09
>> E-Mail  : sebastian.huber at embedded-brains.de
>> PGP     : Public key available on request.
>>
>> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20170712/9d3ccf32/attachment.html>


More information about the users mailing list