proper place for sem_init()