[PATCH] D71600: PowerPC 32-bit - forces 8 byte lock/lock_free decisions at compiled time

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 10 19:02:08 PST 2020


efriedma added a comment.

atomic.c is disabled by default for a good reason: it doesn't work correctly in general.  In particular, if an atomic variable is shared across two shared libraries, the two libraries will use different locks, and therefore the operation won't be atomic.

It might make sense to provide a shared library compiler-rt-atomic or something like that for targets that want it, but someone would have to implement it.  (Or maybe on ELF targets we could make the symbols unique by messing with the linkage... but that might cause other issues.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71600/new/

https://reviews.llvm.org/D71600





More information about the llvm-commits mailing list