From 1b91f784300d193cb175ea4fe7f4a93e41ba6476 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Mon, 23 Nov 2015 19:51:15 +0100 Subject: [PATCH] Add timed wait semaphore --- src/platforms/px4_posix.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/platforms/px4_posix.h b/src/platforms/px4_posix.h index ab53d03900..998342e057 100644 --- a/src/platforms/px4_posix.h +++ b/src/platforms/px4_posix.h @@ -62,6 +62,7 @@ typedef struct { __EXPORT int px4_sem_init(px4_sem_t *s, int pshared, unsigned value); __EXPORT int px4_sem_wait(px4_sem_t *s); +__EXPORT int px4_sem_timedwait(px4_sem_t * sem, const struct timespec * abstime); __EXPORT int px4_sem_post(px4_sem_t *s); __EXPORT int px4_sem_getvalue(px4_sem_t *s, int *sval); __EXPORT int px4_sem_destroy(px4_sem_t *s); @@ -76,6 +77,7 @@ typedef sem_t px4_sem_t; #define px4_sem_init sem_init #define px4_sem_wait sem_wait +#define px4_sem_timedwait sem_timedwait #define px4_sem_post sem_post #define px4_sem_getvalue sem_getvalue #define px4_sem_destroy sem_destroy