matos/core/synchro.h
2021-11-09 15:14:11 +01:00

14 lines
361 B
C

#pragma once
#include <wait.h>
int mutexInit(struct mutex *);
int mutexFree(struct mutex *);
int mutexLock(struct mutex *);
int mutexUnlock(struct mutex *);
int semInit(struct semaphore *, int initVal);
int semFree(struct semaphore *);
int semDown(struct semaphore *, unsigned long timeout);
int semTryDown(struct semaphore *);
int semUp(struct semaphore *);