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:
parent
2f95e2400f
commit
8daafd4fba
1 changed files with 1 additions and 0 deletions
|
@ -505,6 +505,7 @@ FUNC_NORETURN void _Cstart(void)
|
|||
enable_interrupts();
|
||||
bg_thread_main(NULL, NULL, NULL);
|
||||
|
||||
irq_lock();
|
||||
while (1) {
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue