modified cond_mutex.c.