TizenRT Libs&Environment
v2.0 M2
|
Provides APIs for Semaphore. More...
![]() |
Data Structures | |
struct | semholder_s |
Structure of semholder. More... | |
struct | sem_s |
Structure of generic semaphore. More... | |
Macros | |
#define | SEM_INITIALIZER(c) {(c), FLAGS_INITIALIZED, NULL} /* semcount, flags, hhead */ |
Sem initializer. More... | |
Functions | |
int | sem_init (FAR sem_t *sem, int pshared, unsigned int value) |
initialize an unnamed semaphore More... | |
int | sem_destroy (FAR sem_t *sem) |
destroy an unnamed semaphore More... | |
int | sem_wait (FAR sem_t *sem) |
lock a semaphore More... | |
int | sem_timedwait (FAR sem_t *sem, FAR const struct timespec *abstime) |
lock a semaphore More... | |
int | sem_trywait (FAR sem_t *sem) |
lock a semaphore More... | |
int | sem_post (FAR sem_t *sem) |
unlock a semaphore More... | |
int | sem_getvalue (FAR sem_t *sem, FAR int *sval) |
get the value of a semaphore More... | |
Provides APIs for Semaphore.
#define SEM_INITIALIZER | ( | c | ) | {(c), FLAGS_INITIALIZED, NULL} /* semcount, flags, hhead */ |
Sem initializer.
Definition at line 139 of file semaphore.h.
int sem_destroy | ( | FAR sem_t * | sem | ) |
destroy an unnamed semaphore
#include <semaphore.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int sem_getvalue | ( | FAR sem_t * | sem, |
FAR int * | sval | ||
) |
get the value of a semaphore
#include <semaphore.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int sem_init | ( | FAR sem_t * | sem, |
int | pshared, | ||
unsigned int | value | ||
) |
initialize an unnamed semaphore
#include <semaphore.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int sem_post | ( | FAR sem_t * | sem | ) |
unlock a semaphore
#include <semaphore.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
lock a semaphore
#include <semaphore.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int sem_trywait | ( | FAR sem_t * | sem | ) |
lock a semaphore
#include <semaphore.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int sem_wait | ( | FAR sem_t * | sem | ) |
lock a semaphore
#include <semaphore.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)