added semaphore_elem struct