33 #ifndef _FREERTOS_POSIX_SEMAPHORE_H_ 34 #define _FREERTOS_POSIX_SEMAPHORE_H_ 38 #include "FreeRTOS_POSIX_types.h"
int sem_timedwait(sem_t *sem, const struct timespec *abstime)
Lock a semaphore with timeout.
Definition: FreeRTOS_POSIX_semaphore.c:129
int sem_wait(sem_t *sem)
Lock a semaphore.
Definition: FreeRTOS_POSIX_semaphore.c:228
int sem_destroy(sem_t *sem)
Destroy an unnamed semaphore.
Definition: FreeRTOS_POSIX_semaphore.c:45
int sem_init(sem_t *sem, int pshared, unsigned value)
Initialize an unnamed semaphore.
Definition: FreeRTOS_POSIX_semaphore.c:74
int sem_getvalue(sem_t *sem, int *sval)
Get the value of a semaphore.
Definition: FreeRTOS_POSIX_semaphore.c:57
PosixSemType_t sem_t
Semaphore type.
Definition: semaphore.h:43
int sem_post(sem_t *sem)
Unlock a semaphore.
Definition: FreeRTOS_POSIX_semaphore.c:109
represents an elapsed time
Definition: time.h:99
int sem_trywait(sem_t *sem)
Lock a semaphore if available.
Definition: FreeRTOS_POSIX_semaphore.c:206