aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel/src/chmtx.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-05-18 17:54:55 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-05-18 17:54:55 +0000
commit807c5f1882224c2afd471a44889b83c2adf80589 (patch)
treeb2966dd99a77d5b635f6f3b48ead7ec9bcdd41f9 /os/kernel/src/chmtx.c
parentb4aa14e88c9e28a16a5f9c0c220fac6cc36750ad (diff)
downloadChibiOS-807c5f1882224c2afd471a44889b83c2adf80589.tar.gz
ChibiOS-807c5f1882224c2afd471a44889b83c2adf80589.tar.bz2
ChibiOS-807c5f1882224c2afd471a44889b83c2adf80589.zip
Fixed bug 3303908.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2972 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/src/chmtx.c')
-rw-r--r--os/kernel/src/chmtx.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/os/kernel/src/chmtx.c b/os/kernel/src/chmtx.c
index af2b7f347..df71d1cc6 100644
--- a/os/kernel/src/chmtx.c
+++ b/os/kernel/src/chmtx.c
@@ -134,14 +134,16 @@ void chMtxLockS(Mutex *mp) {
prio_insert(dequeue(tp), (ThreadsQueue *)tp->p_u.wtobjp);
tp = ((Mutex *)tp->p_u.wtobjp)->m_owner;
continue;
-#if CH_USE_CONDVARS | CH_USE_SEMAPHORES_PRIORITY | CH_USE_MESSAGES_PRIORITY
+#if CH_USE_CONDVARS | \
+ (CH_USE_SEMAPHORES && CH_USE_SEMAPHORES_PRIORITY) | \
+ (CH_USE_MESSAGES && CH_USE_MESSAGES_PRIORITY)
#if CH_USE_CONDVARS
case THD_STATE_WTCOND:
#endif
-#if CH_USE_SEMAPHORES_PRIORITY
+#if CH_USE_SEMAPHORES && CH_USE_SEMAPHORES_PRIORITY
case THD_STATE_WTSEM:
#endif
-#if CH_USE_MESSAGES_PRIORITY
+#if CH_USE_MESSAGES && CH_USE_MESSAGES_PRIORITY
case THD_STATE_SNDMSGQ:
#endif
/* Re-enqueues tp with its new priority on the queue.*/