shared_ptr's reference counter thread safety on ARM Cortex-M
karel pavlata
k.pavlata@gmail.com
Mon Feb 19 19:33:00 GMT 2018
Dňa pondelok 19. februára 2018 Jonathan Wakely napísal(a):
> On 19 February 2018 at 15:37, Oleg Endo wrote:
> > Even though on such systems there might not be real threads, atomic
> > operations can still be useful, e.g. when sharing variables between the
> > "main thread" and interrupt handlers (adhoc preemptive threads so to
> > say).
>
> It would be fairly simple to add a new mode that means libstdc++
> should use atomic ops, but not provide <thread>, <mutex> etc.
>
> Somebody who cares about it just needs to do the work.
>
This systems can (and usually do) run a lightweight non-posix RTOS so it
would be usefull. I'm not familiar with gcc's internals but will try to
look into that. If anybody can provide hints and/or caveats they're welcome.
More information about the Libstdc++
mailing list