synchronize cond var destruction with exiting waits
[musl] / src / thread / syscall_cp.c