4 #ifndef __KERNEL_SEMAPHORE_H__
5 #define __KERNEL_SEMAPHORE_H__
int up(struct semaphore *sem)
Increase the number of the semaphore.
Definition: semaphore.c:63
int down(struct semaphore *sem)
Decrease the number of the semaphore.
Definition: semaphore.c:23
void sema_init(struct semaphore *sem, int val)
Initialize the semaphore.
Definition: semaphore.c:17
int down_trylock(struct semaphore *sem)
The same as down(), except that if the decrement cannot be immediately performed, then call returns a...
Definition: semaphore.c:43
Definition: semaphore.h:11