diff options
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 */
|