Nut/OS  4.10.3
API Reference
semaphore.h File Reference
#include <compiler.h>
#include <sys/types.h>
#include <sys/thread.h>
Include dependency graph for semaphore.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _SEM
 Semaphore. More...

Typedefs

typedef struct _SEM SEM
 Sempahore type.

Functions

void NutSemInit (SEM *sem, short value)
 Initialize an unnamed semaphore to value.
void NutSemWait (SEM *sem)
 Lock a semaphore.
int NutSemTryWait (SEM *sem)
 Attempt to lock a semaphore without blocking.
void NutSemPost (SEM *sem)
 Unlock a sempahore.
int NutSemDestroy (SEM *sem)
 Free resources allocated for a semaphore.