diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-07-19 13:40:15 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-07-19 13:40:15 +0000 |
commit | 40e9e372738c38180562ab1ff3b1f91d42c14cdd (patch) | |
tree | 777ddb1086710d25cc44e95e2edaee89a35b9361 /nuttx/include | |
parent | 5008a83d14dd96fd953cd698c5d4a2780a77cea9 (diff) | |
download | px4-nuttx-40e9e372738c38180562ab1ff3b1f91d42c14cdd.tar.gz px4-nuttx-40e9e372738c38180562ab1ff3b1f91d42c14cdd.tar.bz2 px4-nuttx-40e9e372738c38180562ab1ff3b1f91d42c14cdd.zip |
Add sem_timedwait()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3798 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/semaphore.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nuttx/include/semaphore.h b/nuttx/include/semaphore.h index aba024f8b..7eea3a41b 100644 --- a/nuttx/include/semaphore.h +++ b/nuttx/include/semaphore.h @@ -92,6 +92,9 @@ typedef struct sem_s sem_t; /**************************************************************************** * Public Function Prototypes ****************************************************************************/ +/* Forward references needed by some prototypes */ + +struct timespec; /* Defined in time.h */ /* Counting Semaphore Interfaces (based on POSIX APIs) */ @@ -101,6 +104,8 @@ EXTERN FAR sem_t *sem_open(FAR const char *name, int oflag, ...); EXTERN int sem_close(FAR sem_t *sem); EXTERN int sem_unlink(FAR const char *name); EXTERN int sem_wait(FAR sem_t *sem); +EXTERN int sem_timedwait(FAR sem_t *sem, + FAR const struct timespec *abstime); EXTERN int sem_trywait(FAR sem_t *sem); EXTERN int sem_post(FAR sem_t *sem); EXTERN int sem_getvalue(FAR sem_t *sem, FAR int *sval); |