Fixed bugs in timer_sleep() and cond_signal(); cleaned up compiler warnings.