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

    <tr>
        <th>Summary</th>
        <td>
            OMP_WAIT_POLICY=PASSIVE still keeps the threads without work running 
        </td>
    </tr>

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

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

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

<pre>
    I've been playing with the OpenMP policy, and realized that, even if the policy is PASSIVE the threads in the barrier are still running. In the following example I expect to see only a thread running while the others are sleeping in `__kmp_wait_template`

```c
// t1.c
// Compile and run: clang -fopenmp t1.c -o t1 && ./t1
#include <unistd.h>
int main() {
        #pragma omp parallel
        #pragma omp single
        {
                #pragma omp task
                {
                        sleep(100);
                }
        }
}
```
Is there any reason for this behaviour?

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0U9-PozYQ_mvMy2iRsVkIDzzsJRcpUk8b6apWfYoGmIAbY1u2SS796ysgub2tVAmBZ75vfjCeD0NQvSGq2esX9rpLcIqD9fWoLmiPSWO7e31gorwSNEQGnMa7Mj3cVBwgDgTvjsy3IzirVXtnYgtoOvCEWv1DHcQB4-ykKxlQ5yVipYIKcHz7_v3wx9fFGwdP2AVQZjEb9F6RB_QEISqtwU_GKNOncFgZZ6u1vc290A8cnSY4AP1w1EaIFgIRWKPvgI_Mz3i4DUrTksHGgXxYS2giN6PKACv46XQZ3emGKp4ijU5jJFZwxneMvz3eBV-f9mGLPRN7iFn62bG1o5vrLVOZDJNv0Go0PbycrSMzuiUEXizEDJgomCggZWIfs2caqUyrp46Aye1kVIhdOjD5dYWViTCiMkxsmKiAlV-eTVZMSOexHxHs6MChR61J_w8clOk1fYDPPACz9V92xHD54P5Cf5i8WubJxCbjnImKyc94uful0vP88_Cc7GoewnxXfp7gfd6rYA2crYc4qAANDXhVdvJM7ld60tWyq2SFCdVZsdmUIquqLBnqYiOaKsMS87zLyrZtu43E7Fx2vMxkd8ZE1YILyUte8koUMku7vOE5Vi02rznmJFnOaUSlU62vY2p9n6gQJqoLWUqRaGxIh0VFQhi6wQIyIWZR-XqOeWmmPrCcaxVi-MgSVdRUv387nv58O_x-Or7_dtj-xeTuqY51_S9ELnxSyixBO0W4WX_5ud3J5HU9xOgCk48d7FUcpiZt7cjEfq76-Lw4b_-mNjKxX3oNTOyXf_k3AAD__xAiQIE">