summaryrefslogtreecommitdiff
path: root/nuttx/include/semaphore.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-14 23:32:23 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-14 23:32:23 +0000
commitd7d4a0d765d12cc152c62a37b490702c39d76447 (patch)
treed3969c50e49cd742124e05349431556344a93f54 /nuttx/include/semaphore.h
parent313eb5bb780f9e9baa353651996b51ce33a85fca (diff)
downloadpx4-nuttx-d7d4a0d765d12cc152c62a37b490702c39d76447.tar.gz
px4-nuttx-d7d4a0d765d12cc152c62a37b490702c39d76447.tar.bz2
px4-nuttx-d7d4a0d765d12cc152c62a37b490702c39d76447.zip
Switching to C99 stdint.h types
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2340 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/semaphore.h')
-rw-r--r--nuttx/include/semaphore.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/nuttx/include/semaphore.h b/nuttx/include/semaphore.h
index 9f38667c1..aba024f8b 100644
--- a/nuttx/include/semaphore.h
+++ b/nuttx/include/semaphore.h
@@ -40,7 +40,9 @@
* Included Files
****************************************************************************/
-#include <sys/types.h>
+#include <nuttx/config.h>
+
+#include <stdint.h>
#include <limits.h>
#ifdef __cplusplus
@@ -51,7 +53,7 @@ extern "C" {
#endif
/****************************************************************************
- * Definitions
+ * Pre-processor Definitions
****************************************************************************/
/****************************************************************************
@@ -66,8 +68,8 @@ struct semholder_s
#if CONFIG_SEM_PREALLOCHOLDERS > 0
struct semholder_s *flink; /* Implements singly linked list */
#endif
- void *holder; /* Holder TCB (actual type is _TCB) */
- sint16 counts; /* Number of counts owned by this holder */
+ void *holder; /* Holder TCB (actual type is _TCB) */
+ int16_t counts; /* Number of counts owned by this holder */
};
#endif
@@ -75,7 +77,7 @@ struct semholder_s
struct sem_s
{
- sint16 semcount; /* >0 -> Num counts available */
+ int16_t semcount; /* >0 -> Num counts available */
/* <0 -> Num tasks waiting for semaphore */
#ifdef CONFIG_PRIORITY_INHERITANCE
struct semholder_s hlist; /* List of holders of semaphore counts */