#include "locks.hfa" fast_block_lock f; fast_block_lock f2; fast_cond_var( fast_block_lock ) f_c_f; thread T1 {}; bool wait = true; bool wait2 = true; void main( T1 & this ) { lock(f); if (wait) { wait = false; wait(f_c_f, f); } else { notify_one(f_c_f); unlock(f); } lock(f2); if (wait2) { wait2 = false; wait(f_c_f, f2); } else { notify_one(f_c_f); unlock(f2); } } int main() { T1 t[2]; }