Added assertion into chSchGoSleepS() to prevent sleeping in the idle thread.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14048 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2021-02-13 09:00:03 +00:00
parent ce63cadda6
commit c77c93324d
1 changed files with 2 additions and 0 deletions

View File

@ -413,6 +413,8 @@ void chSchGoSleepS(tstate_t newstate) {
chDbgCheckClassS();
chDbgAssert(otp != chSysGetIdleThreadX(), "sleeping in idle thread");
/* New state.*/
otp->state = newstate;