/*
 * 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_ */
