HomeFreeBSD

Reapply libcxxrt atomics cleanup commit, preparing for upstream fix

Description

Reapply libcxxrt atomics cleanup commit, preparing for upstream fix

This reapplies upstream commit fd484be, as there is a follow-up fix for
the possible hangs in __cxa_guard_acquire() on i386:

Atomics cleanup (#11)

We need to test exception specifiers but they're gone in C++17 so
compile the tests with an older version of the standard.

Rewrite the guard logic to be more idiomatic C++ and more
comprehensible and make sure that atomics are used where necessary.

Obtained from: https://github.com/libcxxrt/libcxxrt/commit/fd484be
Fixes: 56aaed388b0a
MFC after: 2 weeks

(cherry picked from commit bfffb66e7f3cf9766e45a23080200c18535c2b85)

Details

Provenance
dimAuthored on Mar 20 2022, 9:19 PM
Parents
rG992948b97d6b: Revert upstream libcxxrt commit which can cause hangs on i386
Branches
Unknown
Tags
Unknown