added semaphore getter and setter