#ifndef SEMAPHORE_H #define SEMAPHORE_H #include #include typedef struct sem_t { int8_t value; int8_t locked; mutex_t mutex; } sem_t; sem_t sem_init(int8_t value); int sem_wait(sem_t *sem); int sem_signal(sem_t *sem); #endif /* SEMAPHORE_H*/