<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/126559>126559</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libc][pthread] pthread_rwlock_t is linux specific
</td>
</tr>
<tr>
<th>Labels</th>
<td>
libc
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
nickdesaulniers
</td>
</tr>
</table>
<pre>
41fecca97b77a added support for pthread_rwlock_t. Our user facing header (libc/include/llvm-libc-types/pthread_rwlock_t.h) defines this type in terms of `__futex_word`, which is perhaps linux specific (perhaps libc/include/llvm-libc-types/__futex_word.h should `#error` when `__linux__` is not defined? cc @SchrodingerZhu
I suspect this will be a problem for supporting this type on non-linux. Changing the type will probably need to update `PTHREAD_RWLOCK_INITIALIZER` in libc/include/llvm-libc-macros/pthread-macros.h.
#126314
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyEk09v2zAMxT-NfCFqyHIcOwcf0qbBghXr0BUY0IshS7SlVZEM_Wnabz_YydAOBbYrTZPv_fjEQ9CjRWxJdU2qXcZTVM63VotniYEnYzX6kPVOvrWrYkAh-Kbu65oDlxIlhDRNzkcYnIcpKo9cdv5knHjuYg73yUMK6GHgQtsRFHKJHghrjO4FYXtthUkSCdsb83K8mqtX8W3CQNj-0zhF2AYkDtpigKh0gLkVtIWI_hjADUDWtOuGFPG1OzkvyZoSdgMnpYUCHWBCr_gUwGibXiFMKPSgxazn_ct_dX1ckCsIyiUjYVlVovfOkzWFk0J7VrPs6rq5qANYFy8WJCn3IASQFf0hlHdS2xH9k0pA6JbQ7QFCmhXGs9WTNgZ6BA6Td73B44L8gn9m-w7EWbDOXi2Lc4Abxe147sBzwzJrHsN78wYWUUJ0kCbJI86ivz9-ebjd7rqHn3f3N1-7w7fD42F7d3i6fVhc2H9ROnLh3YfzXQq5ys-2CCsLti6LVSbbUm7KDc-wLepywwrK6iZTLR2qVcEpFkPPSsmrZuhL2qxEw0vR1BXNdMsoqygraFFXddXkPWv6dTMgqxkvpWjIiuKRa5PPsnLnx0yHkLAt2LqqNpnhPZqwJJ6xsxU2Z9-3i40-jYGsqNEhhvcJUUezvJLlh2pHquuLQ1LtPkV_PvXfIcuSN62KcQqk3BK2J2w_6qhSnwt3vBD8A3Ly7heKOBOedc80L9JfWvY7AAD__73bPJ4">