svn commit: r288121 - projects/clang370-import/contrib/libc++/src/support
Warner Losh
imp at bsdimp.com
Tue Sep 22 18:37:47 UTC 2015
> On Sep 22, 2015, at 11:34 AM, Dimitry Andric <dim at freebsd.org> wrote:
> NOTE: this needs to be fixed properly later on, by supplying library
> functions implementing atomic operations for arm < v6. We should
> probably take those from sys/arm/arm/stdatomic.c, and stuff them into
> either libgcc or compiler-rt.
I don’t think you can do that.
arm < v6 is special. The CPUs don’t have atomic operations. In the kernel,
we disable interrupts and do the op. You can’t do that in user land. Instead,
you have to use RAS (Restartable Atomic Sequences) and have the kernel
grok the RAS. Thankfully, the RAS support in the kernel is just the R in that.
But it does mean that we’ll have some work to do this properly.
I’m not entirely sure that your ‘fix’ makes things actually safe, even if it
seems to make them work today. I’ll have to study it more closely.
Warner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-projects/attachments/20150922/99ab7cab/attachment.bin>
More information about the svn-src-projects
mailing list