engine_control/source/firmware/kernel/semaphore.h

21 lines
339 B
C
Raw Normal View History

2016-07-23 05:59:54 +00:00
/*
* semaphore.h
*
* Created on: Oct 25, 2015
* Author: tkl
*/
#ifndef SEMAPHORE_H_
#define SEMAPHORE_H_
struct semaphore {
int cnt;
struct queue queue;
};
int semaphore_init(struct semaphore *sem, int value);
int semaphore_wait(struct semaphore *sem);
int semaphore_post(struct semaphore *sem);
#endif /* SEMAPHORE_H_ */