18 #ifndef _XENOMAI_ALCHEMY_SEM_H 19 #define _XENOMAI_ALCHEMY_SEM_H 22 #include <alchemy/timer.h> 38 typedef struct RT_SEM RT_SEM;
59 char name[XNOBJECT_NAME_LEN];
76 const struct timespec *abs_timeout);
84 static inline int rt_sem_p(RT_SEM *sem, RTIME timeout)
98 const char *name, RTIME timeout);
int rt_sem_v(RT_SEM *sem)
Signal a semaphore.
Definition: sem.c:416
static int rt_sem_p(RT_SEM *sem, RTIME timeout)
Pend on a semaphore (with relative scalar timeout).
Definition: sem.h:84
int rt_sem_broadcast(RT_SEM *sem)
Broadcast a semaphore.
Definition: sem.c:452
int nwaiters
Number of tasks waiting on the semaphore.
Definition: sem.h:55
Semaphore status descriptor.
Definition: sem.h:47
unsigned long count
Current semaphore value.
Definition: sem.h:51
int rt_sem_create(RT_SEM *sem, const char *name, unsigned long icount, int mode)
Create a counting semaphore.
Definition: sem.c:179
static int rt_sem_p_until(RT_SEM *sem, RTIME timeout)
Pend on a semaphore (with absolute scalar timeout).
Definition: sem.h:78
int rt_sem_unbind(RT_SEM *sem)
Unbind from a semaphore.
Definition: sem.c:584
int rt_sem_bind(RT_SEM *sem, const char *name, RTIME timeout)
Bind to a semaphore.
Definition: sem.c:561
int rt_sem_inquire(RT_SEM *sem, RT_SEM_INFO *info)
Query semaphore status.
Definition: sem.c:492
char name[XNOBJECT_NAME_LEN]
Name of semaphore.
Definition: sem.h:59
int rt_sem_p_timed(RT_SEM *sem, const struct timespec *abs_timeout)
Pend on a semaphore.
Definition: sem.c:378
int rt_sem_delete(RT_SEM *sem)
Delete a semaphore.
Definition: sem.c:261