Add Semaphore class.