PI-aware condvar mutex and a switch