27#ifndef __semaphore_h__
28#define __semaphore_h__
101 const time_t abs_timeout);
Interface: critical section management.
void atomic_inc(atomic_t *counter)
increment atomic counter without interruption.
volatile unsigned char atomic_t
The data type that allows for atomic count operations.
int sem_post(sem_t *sem)
Post a semaphore.
int sem_timedwait(sem_t *sem, const time_t abs_timeout)
Wait for semaphore (blocking with timeout).
int sem_trywait(sem_t *sem)
Try a wait for semaphore (non-blocking)
int sem_init(sem_t *sem, int pshared, unsigned int value)
Initialize a semaphore.
int sem_destroy(sem_t *sem)
We're done with the semaphore, destroy it.
int sem_getvalue(sem_t *sem, int *sval)
Get the semaphore value.
int sem_wait(sem_t *sem)
Wait for semaphore (blocking)
atomic_t sem_t
the semaphore data-type
Interface: Time-related data and types.
unsigned long time_t
time type