From eb08d040472304b0bf267a7a0de58f7110dbcdb9 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 12 Oct 2018 13:50:25 +0000 Subject: Fixed an error when semaphores are used instead of mutexes. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12350 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- os/lib/src/chpipes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'os/lib/src/chpipes.c') diff --git a/os/lib/src/chpipes.c b/os/lib/src/chpipes.c index c18a21597..6f6e8a30f 100644 --- a/os/lib/src/chpipes.c +++ b/os/lib/src/chpipes.c @@ -61,13 +61,13 @@ #define PR_LOCK(p) chMtxLock(&(p)->rmtx) #define PR_UNLOCK(p) chMtxUnlock(&(p)->rmtx) #else -#define PC_INIT(p) chMtxObjectInit(&(p)->csem, (cnt_t)1) +#define PC_INIT(p) chSemObjectInit(&(p)->csem, (cnt_t)1) #define PC_LOCK(p) (void) chSemWait(&(p)->csem) #define PC_UNLOCK(p) chSemSignal(&(p)->csem) -#define PW_INIT(p) chMtxObjectInit(&(p)->wsem, (cnt_t)1) +#define PW_INIT(p) chSemObjectInit(&(p)->wsem, (cnt_t)1) #define PW_LOCK(p) (void) chSemWait(&(p)->wsem) #define PW_UNLOCK(p) chSemSignal(&(p)->wsem) -#define PR_INIT(p) chMtxObjectInit(&(p)->rsem, (cnt_t)1) +#define PR_INIT(p) chSemObjectInit(&(p)->rsem, (cnt_t)1) #define PR_LOCK(p) (void) chSemWait(&(p)->rsem) #define PR_UNLOCK(p) chSemSignal(&(p)->rsem) #endif -- cgit v1.2.3