matos/core/synchro.h

14 lines
361 B
C
Raw Permalink Normal View History

2020-07-08 23:08:50 +02:00
#pragma once
#include <wait.h>
int mutexInit(struct mutex *);
int mutexFree(struct mutex *);
int mutexLock(struct mutex *);
int mutexUnlock(struct mutex *);
2021-11-09 20:13:40 +01:00
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 *);