kernel: Final spin in !MULTITHREADING should be locked

Now that we call main() with interrupts enabled in !MULTITHREADING, we
need to disable them again for the final fallback "loop-forever
because user code returned" state.  Otherwise some architectures will
toss interrupts into a context where we obviously aren't prepared.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2018-08-30 09:45:12 -07:00 committed by Anas Nashif
commit 8daafd4fba

View file

@ -505,6 +505,7 @@ FUNC_NORETURN void _Cstart(void)
enable_interrupts();
bg_thread_main(NULL, NULL, NULL);
irq_lock();
while (1) {
}
#endif