<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/87117>87117</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[OpenMP][libomp] Hidden helper team should not allocate from thread pool
</td>
</tr>
<tr>
<th>Labels</th>
<td>
openmp:libomp
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
jpeyton52
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jpeyton52
</td>
</tr>
</table>
<pre>
The hidden helper team pre-allocates the `gtid` space `[1, num_hidden_helpers]` (inclusive). If regular host threads are allocated, then put back in the thread pool, then the hidden helper team is initialized, the hidden helper team tries to allocate the threads from the thread pool with `gtid`s higher than `[1, num_hidden_helpers]`. Instead, have the hidden helper team fork OS threads so the correct `gtid` range used for hidden helper threads.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMUsFu2zoQ_BrqsohA0aEtHXRIXmC8HIoUaO8BJa5EJhRJkCsX6dcXkl3FSFOgJwLE7MzOzKqc7egRWybvmRAvEd8oeCmYEEw-FGomE1K7fRdd0G_td4NgrNbowaCLmIBQTRAT3ijnQq8IM5BBYHs-ktVszyFH1a8fTN5XTPwHfp6ezyTPZ5LM5MOCZKK2vndztidkoinhcYCE4-xUAhMyAZmESmdQCeG3nl4oyaCHOBN0qn8F69cdzmiIIbgNQ58bsBmst2SVsz83xs-AlOziMGzyV0oZhhSmj9Lww5K5yiODsaNZ-Izy_xJLCY8-E6p1LaNO-LfdhpBe4enbtk0OK7IPKWFP15Uk5UeEOaNehj5yncfLQrc73ewaVWBbHarqILmQdWHaqtYcm4YfOikQeX3YV2qQjVSDGpq614VtBRe3fCcaISou65JrrpXY7w-dlFr0gt1ynJR1pXOnqQxpLGzOM7b1IlM41aHLl7sMEf0U2e7O2S5M8XKdqV0mb7p5zOyWO5spv3ORJbee9VNE_-XrkqK8v4zLB_j_z-SyCbPT4AO993rpcuuxmJNrDVHMbHfHxJGJ42jJzF3Zh4mJ4yJ_eW5iCi_YExPH1Vdm4rha-xUAAP__xfUnxg">