aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel/src/chthreads.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-02-12 18:55:06 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-02-12 18:55:06 +0000
commit60f8ed2a0b990b82862af1df2f146126dac0eb73 (patch)
treea8e0bef518cf349ccba37d4618e80868a44ad302 /os/kernel/src/chthreads.c
parent4d832fdf1c1ca932d16198df7b3c04dcd083e7e2 (diff)
downloadChibiOS-60f8ed2a0b990b82862af1df2f146126dac0eb73.tar.gz
ChibiOS-60f8ed2a0b990b82862af1df2f146126dac0eb73.tar.bz2
ChibiOS-60f8ed2a0b990b82862af1df2f146126dac0eb73.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1593 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/src/chthreads.c')
-rw-r--r--os/kernel/src/chthreads.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/os/kernel/src/chthreads.c b/os/kernel/src/chthreads.c
index f96cea942..6f67f7093 100644
--- a/os/kernel/src/chthreads.c
+++ b/os/kernel/src/chthreads.c
@@ -427,7 +427,9 @@ msg_t chThdWait(Thread *tp) {
chSysLock();
chDbgAssert(tp != currp, "chThdWait(), #1", "waiting self");
+#if CH_USE_DYNAMIC
chDbgAssert(tp->p_refs > 0, "chThdWait(), #2", "not referenced");
+#endif
if (tp->p_state != THD_STATE_FINAL) {
list_insert(currp, &tp->p_waiting);
chSchGoSleepS(THD_STATE_WTEXIT);