From c1f07aa0e24f06ba4f52aa9cd0c5c8e1cc2dd077 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 6 Mar 2020 15:42:50 +0000 Subject: [PATCH] Fixed build error with specific options. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@13394 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/nil/src/ch.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/os/nil/src/ch.c b/os/nil/src/ch.c index 35ebbac03..2d9e211c2 100644 --- a/os/nil/src/ch.c +++ b/os/nil/src/ch.c @@ -369,10 +369,13 @@ void chSysTimerHandlerI(void) { /* Timeout on queues/semaphores requires a special handling because the counter must be incremented.*/ /*lint -save -e9013 [15.7] There is no else because it is not needed.*/ +#if CH_CFG_USE_SEMAPHORES == TRUE if (NIL_THD_IS_WTQUEUE(tp)) { tp->u1.semp->cnt++; } - else if (NIL_THD_IS_SUSPENDED(tp)) { + else +#endif + if (NIL_THD_IS_SUSPENDED(tp)) { *tp->u1.trp = NULL; } /*lint -restore*/