Tizen RT Libs&Environment  v1.1 D4
semaphore.h File Reference

Semaphore APIs. More...

#include <tinyara/config.h>
#include <stdint.h>
#include <limits.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  semholder_s
 Structure of semholder. More...
 
struct  sem_s
 Structure of generic semaphore. More...
 

Macros

#define PRIOINHERIT_FLAGS_DISABLE
 
#define SEMHOLDER_INITIALIZER   {NULL, NULL, 0}
 
#define SEM_INITIALIZER(c)   {(c), 0, NULL} /* semcount, flags, hhead */
 Sem initializer. More...
 
#define EXTERN   extern
 

Typedefs

typedef struct sem_s sem_t
 

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...
 
void sem_timeout (int argc, uint32_t pid)
 

Detailed Description

Semaphore APIs.

Definition in file semaphore.h.

Macro Definition Documentation

◆ EXTERN

#define EXTERN   extern

Definition at line 156 of file semaphore.h.

◆ PRIOINHERIT_FLAGS_DISABLE

#define PRIOINHERIT_FLAGS_DISABLE
Value:
(1 << 0) /* Bit 0: Priority inheritance
* is disabled for this semaphore */

Definition at line 79 of file semaphore.h.

◆ SEMHOLDER_INITIALIZER

#define SEMHOLDER_INITIALIZER   {NULL, NULL, 0}

Definition at line 103 of file semaphore.h.

Typedef Documentation

◆ sem_t

typedef struct sem_s sem_t

Definition at line 130 of file semaphore.h.

Function Documentation

◆ sem_timeout()

void sem_timeout ( int  argc,
uint32_t  pid 
)