aboutsummaryrefslogtreecommitdiffstats
path: root/src/chthreads.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/chthreads.c')
-rw-r--r--src/chthreads.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/chthreads.c b/src/chthreads.c
index a0729311f..041690af9 100644
--- a/src/chthreads.c
+++ b/src/chthreads.c
@@ -139,6 +139,10 @@ void chThdSuspend(Thread **tpp) {
chSysLock();
+#ifdef CH_USE_DEBUG
+ if (*tpp)
+ chDbgPanic("chthreads.c, chThdSuspend()");
+#endif
*tpp = currp;
chSchGoSleepS(PRSUSPENDED);
*tpp = NULL;