Date: Tue, 22 Sep 2015 12:37:42 -0600 From: Warner Losh <imp@bsdimp.com> To: Dimitry Andric <dim@freebsd.org> Cc: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: Re: svn commit: r288121 - projects/clang370-import/contrib/libc++/src/support Message-ID: <00F42FF7-84D4-4C97-974F-C28DB36D4392@bsdimp.com> In-Reply-To: <201509221734.t8MHYp0W052286@repo.freebsd.org> References: <201509221734.t8MHYp0W052286@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] > On Sep 22, 2015, at 11:34 AM, Dimitry Andric <dim@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 [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJWAZ/2AAoJEGwc0Sh9sBEA6CEP/R/uNIrW2u2WD4Us7G0zTR8d v6xpXVIgnz574slfWVB50LV3eQsD5aCgDQQ9SdgWntrb2t87LJXvPnCs2Sm4kNBO s4JNN6ZFc1YdWDKldUAa/b5zGi9mtkUQPpjl5ODzXLZ2ovuQS1TABHYD2mDV5ZL6 CbdgVsCgWCmjsuqUAYWrJDAM1a7CLxR1hXCZwMqO4Usocc2NDFB7fJpBA/YGTUZI z5TkmLsIZ7f2yHPOoMC3JPIpk7o2CbvZP/mNIWMIBDR3a2pks1CNkua6AKBYspxy tYZHzq9nBnfmR4vzPMeZ4m0JOoYj92GjYf6NlvAEupNaETgeAKvzbeb3ysaVhTPd iCeDdrp0W2JW1oDiKtDq8S3Miaw4DibvbP74/H3ijkM8RmPHcy0FH0H0fJ95gDGQ pqNytiAwpuUtXK7ZXa+GrJEQ6SnoTMtbgZO35SOFNnBY7xDrlzeOIqgSbEICxwi5 X7opBIc28I+NxW6Ei2a92+3XA/VwyPQExNTdk/lh/3YL08zJXaHSTdiNzr4qbZKp V9+tz9FDk6ov2cyNBMTYq6XyXIum22PZFhakFhGMIIZGdr5PTWn+NslgibRM/QyG LW4sKHxc+rDe+/EZeA6AWHW+EIw2BykYly2brRM+om2lIPuPGwAHR+RuSx7sYtiC 5sytL3pB6bgdI0jbA+Vw =Tk8n -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00F42FF7-84D4-4C97-974F-C28DB36D4392>
