Skip to content

Prevent possible UB, and use naked functions correctly.

Jacob Lorentzon requested to merge 4lDO2/kernel:switch_to_safer into master

More recent versions of rustc have started to warn about #[naked] functions which contain more than only a single inline asm block, which will eventually be phased out. Not only that, but rsp cannot be changed in inline assembly, if there is regular code in the same function.

This MR fixes that, while simultaneously also making sure that the context switch locks are only released inside the switch_to function, by calling a rust hook.

Merge request reports