61 #ifndef __INCLUDE_SEMAPHORE_H 62 #define __INCLUDE_SEMAPHORE_H 68 #include <tinyara/config.h> 74 #define EXTERN extern "C" 90 #ifdef CONFIG_PRIORITY_INHERITANCE 97 #if CONFIG_SEM_PREALLOCHOLDERS > 0 104 #if CONFIG_SEM_PREALLOCHOLDERS > 0 105 #define SEMHOLDER_INITIALIZER {NULL, NULL, 0} 107 #define SEMHOLDER_INITIALIZER {NULL, 0} 122 #ifdef CONFIG_PRIORITY_INHERITANCE 123 #if CONFIG_SEM_PREALLOCHOLDERS > 0 138 #ifdef CONFIG_PRIORITY_INHERITANCE 139 #if CONFIG_SEM_PREALLOCHOLDERS > 0 140 #define SEM_INITIALIZER(c) {(c), NULL} 142 #define SEM_INITIALIZER(c) {(c), SEMHOLDER_INITIALIZER} 145 #define SEM_INITIALIZER(c) {(c)} 165 int sem_init(FAR
sem_t *sem,
int pshared,
unsigned int value);
209 #ifdef CONFIG_FS_NAMED_SEMAPHORES 214 FAR
sem_t *sem_open(FAR
const char *name,
int oflag, ...);
218 int sem_close(FAR
sem_t *sem);
222 int sem_unlink(FAR
const char *name);
int sem_trywait(FAR sem_t *sem)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int sem_wait(FAR sem_t *sem)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
This is the common part of the task control block (TCB). The TCB is the heart of the TinyAra task-con...
int sem_timedwait(FAR sem_t *sem, FAR const struct timespec *abstime)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int sem_getvalue(FAR sem_t *sem, FAR int *sval)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int sem_init(FAR sem_t *sem, int pshared, unsigned int value)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int sem_destroy(FAR sem_t *sem)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int sem_post(FAR sem_t *sem)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
Structure of generic semaphore.
struct semholder_s * flink
structure represents an elapsed time
FAR struct semholder_s * hhead