This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: shared_ptr's reference counter thread safety on ARM Cortex-M
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Oleg Endo <oleg dot endo at t-online dot de>
- Cc: karel pavlata <k dot pavlata at gmail dot com>, "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 19 Feb 2018 15:45:23 +0000
- Subject: Re: shared_ptr's reference counter thread safety on ARM Cortex-M
- Authentication-results: sourceware.org; auth=none
- References: <CAJi1=HMcF_EJZdVhU--kWg__WPOjXLZwLw6H_1y4oxrovQLZ0g@mail.gmail.com> <CAH6eHdSNDzEg1EaQuUzi1G5Wu+_LdPf66SH=YQgtPc0bBGWsWw@mail.gmail.com> <1519054665.16577.13.camel@t-online.de>
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.