add more predictable behaviour in lock_cond.c