added #define init_MUTEX(sem) sema_init(sem, 1) to avoid compilation error