add semaphore interfaces
impl mac semaphore