diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2007-10-01 17:42:47 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2007-10-01 17:42:47 +0000 |
commit | 3a90ab685aaae59f242ae31260e67e9125ae78cd (patch) | |
tree | 1413d1fa5a06ee7e720a1de121c537bb1ecb1c45 /src/include/semaphores.h | |
parent | 9a0ef300bce50901d5de3d6d722e29b79a2f9a36 (diff) | |
download | ChibiOS-3a90ab685aaae59f242ae31260e67e9125ae78cd.tar.gz ChibiOS-3a90ab685aaae59f242ae31260e67e9125ae78cd.tar.bz2 ChibiOS-3a90ab685aaae59f242ae31260e67e9125ae78cd.zip |
Preparation for AVR core support.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@27 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/include/semaphores.h')
-rw-r--r-- | src/include/semaphores.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/include/semaphores.h b/src/include/semaphores.h index 83d4613de..8179627f4 100644 --- a/src/include/semaphores.h +++ b/src/include/semaphores.h @@ -34,12 +34,12 @@ typedef struct { /** Queue of the threads sleeping on this Semaphore.*/
ThreadsQueue s_queue;
/** The Semaphore counter.*/
- t_semcnt s_cnt;
+ t_cnt s_cnt;
} Semaphore;
-void chSemInit(Semaphore *sp, t_semcnt n);
-void chSemReset(Semaphore *sp, t_semcnt n);
-void chSemResetI(Semaphore *sp, t_semcnt n);
+void chSemInit(Semaphore *sp, t_cnt n);
+void chSemReset(Semaphore *sp, t_cnt n);
+void chSemResetI(Semaphore *sp, t_cnt n);
void chSemWait(Semaphore *sp);
void chSemWaitS(Semaphore *sp);
t_msg chSemWaitTimeout(Semaphore *sp, t_time time);
@@ -59,21 +59,18 @@ void chSemLowerPrioSignalWait(Semaphore *sps, Semaphore *spw); * Decreases the semaphore counter, this macro can be used when it is ensured
* that the counter would not become negative.
*/
-#define chSemFastWaitS(sp) \
- ((sp)->s_cnt--)
+#define chSemFastWaitS(sp) ((sp)->s_cnt--)
/**
* Increases the semaphore counter, this macro can be used when the counter is
* not negative.
*/
-#define chSemFastSignalI(sp) \
- ((sp)->s_cnt++)
+#define chSemFastSignalI(sp) ((sp)->s_cnt++)
/**
* Returns the semaphore counter current value.
*/
-#define chSemGetCounter(sp) \
- ((sp)->s_cnt)
+#define chSemGetCounter(sp) ((sp)->s_cnt)
#endif /* CH_USE_SEMAPHORES */
|