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

    <tr>
        <th>Summary</th>
        <td>
            [libc++] Switch to the officially documented APIs for implementing ulock_{wait,wake} on Apple
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc++
      </td>
    </tr>

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

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

<pre>
    While discussing with @huixie90 and Apple folks about https://github.com/llvm/llvm-project/issues/109290, it was noticed that we were still using forward-declarations of `__ulock_wait` and `__ulock_wake`. Instead, the public API `os_sync_wait_on_address` is now provided and [documented](https://developer.apple.com/documentation/os/os_sync_wait_on_address), so we should switch to that. This can be a simple NFC refactoring.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJykkkFr4zoUhX-NvLnUWIrt1AsvmoZAN48H78Esgyxdx3eqSEZXjqf_fpDT0hZmN2BsEL7nHp3zaWa6eMReNAeh1LTQL8KuEkqJ5ljoJU0h9s5S8B6LIdi3_sdEDsESm4WZ_AVWShOIuvqYBe0tPM2zQxiDe2XQQ1gSTCnNLHZPQp2EOl0oTctQmnAV6uTc7ePzMMfwE00S6kTMC7JQJ1l1Klt6BkqwagYfEhm0kCadYEVYMSJwIudg2SyNIa462geLxumoEwXPEEYQbXU-Ly6Y1_OqKYn2bvbb8SuKtirhxXNCbfPWNCHMy-DIwNO_L_nvwGd-82YTOQd_1tZGZM56lO2tMMdwI4v2rt8cbDDLFX1CK5qjUI_f07B4QxdmjKXOub3H8jGz-RfqFHh7_Xm16rJVDjkPnsLiLPBKyUyQwhZUCf9PxGC0hwFBA9M1V_TP6RkijtqkEMlfysL2O9vtOl1gL_eNrBolZV1M_dDuWsS9GoySddPUtdTDoJRs8BHbsZMF9apSTdWqveyUbOrycWgbxK7e7yTWu7YSdYVXTa7MRZchXoqt4l7WraxV4fSAjt9BdDQYoQ7bs6EY-w2PYbmwqCtHnPhTJ1FyG8Jfxpoj_PclAIQwjmRIO_cGn23kRjnzAlsc-TADdIdB7A8bJup5w2J_hODvZBdLdP1fEH2_8a1XvwMAAP__Z7EpMg">