Issue 89891
Summary `std::lock_guard` is unavailable when `_LIBCPP_HAS_NO_THREADS` is set
Labels libc++
Assignees
Reporter petrhosek
    When `_LIBCPP_HAS_NO_THREADS` is set,`std::lock_guard` becomes unavailable: https://github.com/llvm/llvm-project/blob/662ef8604268b207910225ecca90daf30a46720b/libcxx/include/__mutex/lock_guard.h#L19-L51

`std::lock_guard` takes mutex implementation as a template argument, so even if the platform doesn't support standard threading API, users may still want to use it with their own custom mutex implementation which is common on baremetal platforms.

This is related to issue https://github.com/llvm/llvm-project/issues/84879.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to