[libcxx-commits] [PATCH] D75183: [libcxx] Guard C++20 atomic type aliases

Mikhail Maltsev via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Feb 27 02:58:49 PST 2020


miyuki added a comment.

In D75183#1893997 <https://reviews.llvm.org/D75183#1893997>, @jfb wrote:

> Actually: how are your locks implemented to support atomic? You disable interrupts? I think you want to contribute a version of atomic which does this, instead of saying "nothing is lock free, use locks" and then doing all the magic in the locks.


For operations used in libc++abi (atomic exchange, atomic compare-exchange) we provide weak definitions of atomic functions which work correctly in single-threaded environments. The idea is that the user will provide multithreaded versions, which would typically rely on RTOS API to disable/enable interrupts. Unfortunately the implementation is not complete.

I think I am going to abandon the patch for now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75183





More information about the libcxx-commits mailing list