thread_block says that interrupts must be turned off before it can sleep; has been added to timer.c