Fixed irq_enable bug in micros(), tidied up semaphore_t.