aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt
diff options
context:
space:
mode:
Diffstat (limited to 'os/rt')
-rw-r--r--os/rt/src/chdynamic.c3
-rw-r--r--os/rt/src/chthreads.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/os/rt/src/chdynamic.c b/os/rt/src/chdynamic.c
index 61044146e..05cb3a265 100644
--- a/os/rt/src/chdynamic.c
+++ b/os/rt/src/chdynamic.c
@@ -119,7 +119,8 @@ void chThdRelease(thread_t *tp) {
break;
#endif
default:
- chDbgAssert(false, "unexpected case");
+ /* Nothing to do for static threads, those are removed from the
+ registry on exit.*/
break;
}
}
diff --git a/os/rt/src/chthreads.c b/os/rt/src/chthreads.c
index b20779fcd..69013017e 100644
--- a/os/rt/src/chthreads.c
+++ b/os/rt/src/chthreads.c
@@ -494,6 +494,7 @@ msg_t chThdWait(thread_t *tp) {
chSysUnlock();
#if CH_CFG_USE_DYNAMIC == TRUE
+ /* Releasing a lock if it is a dynamic thread.*/
chThdRelease(tp);
#endif