static semaphore macro added