<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/93422>93422</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            atomic_flag notification functions must be lock-free
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          gonzalobg
      </td>
    </tr>
</table>

<pre>
    [P3255R0](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3255r0.html) points out that libc++ implementation of atomic_flag notification functions is incorrectly not lock-free, because it uses an array of condvars in all platforms.

libstdc++ does not do that on Linux, so to me this sounds like a bug in libc++, at least on Linux, and most likely on all other platforms as well.

@ldionne for vis.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMUsuO4zgM_Br5QsSw6Tycgw_d28hpD4v9gYUs07a6ZdEQ6WQzXz9QMoOgb3OxJRRZVRTLivgpEnXm8G4OH4XddObUTRx_2MD9VPQ83DP4T4OHw7-VOXwYbGfVVUzzZvBi8HK73UpeKe5Eh5LTZPDyqa42eBGHmAsmzLeBnRi8rHallA9Y4T7fM3OqylmXYPAMK_uoArwp6GwVgu-dwXeD7-CXNdBCUa16jsAjWOXFu__GYCeIrH707omNW3T5IOAFfHScEjkN91wFgd3XbkxEBv-CnpzdhMArbEICNoJNyd4zveM4XG3KDGBDgDVYHTktUprqw1Rvz2_wvejw2-TAJA-VgZ8DcIS_fdz-z2LCoAwLgc5eQHiLg0DwXwQW-m3KOq95c0N-ALLyncXGARYWfXSGe8ayO9aZ0ssjWIEbhfDNq9lXYfAcI8HICa5eymLomuHcnG1BXX2qj6d9256aYu5OjtyR2mY8Nns82qY_ncaxaR2dG6zHlgrf5R1WBzzW7b6um_LkhjPWx6PDhtoeR7OvaLE-lCFcl5yNwots1J2bPWIRbE9BHtFDjHSDB2gQcxJTl3t2_TZJ9uxF5cWiXgN1f7D8ZROFnl4bL7YUuu_5nbzOW186XgxessSv325N_ElODV4exnJmn8avHf4MAAD__4ihD1I">