[PATCH] D116088: [compiler-rt] Implement ARM atomic operations for architectures without SMP support

Pavel Kosov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 20 06:17:57 PST 2022


kpdev42 added a comment.

In D116088#3254400 <https://reviews.llvm.org/D116088#3254400>, @joerg wrote:

> Correct me if I'm wrong, but I don't think this stubs are async signal safe nor will they work for preemptive multitasking systems?

Those stubs are basically cas loops (https://en.wikipedia.org/wiki/Compare-and-swap) which are not much different from their SMP counterparts, except memory sync ops are not used. This should work normally in case of preemption (preempting thread will spend its quota in busy-wait). Signal can be a problem if it preempt a thread executing atomic op, but I wonder if SMP code handles this


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116088



More information about the cfe-commits mailing list