process: move all the optimizations of switchout() into the C code
authorAlan Cox <alan@linux.intel.com>
Thu, 29 Mar 2018 14:42:24 +0000 (15:42 +0100)
committerAlan Cox <alan@linux.intel.com>
Thu, 29 Mar 2018 14:42:24 +0000 (15:42 +0100)
commitb8b0d51fa7882db68a63f943c86f83510e70a3d5
tree85eef621c78758199ba36f6235773eb3e0a670f8
parentbf6a4ad52bc2b4a5c3d079298995a44b13e0d0d0
process: move all the optimizations of switchout() into the C code

This fixes a ton of duplication in the asm code, and in addition makes the
pre-emption cases faster as we know in those cases that the optimizations
never apply.

switchout() becomes a C fnction

platform_switchout() is now the required platform specific stub which shouldn't
need to do any optimizing beyond udata copy elimiations.

Merge a z80fixedbank example of the changes.
Kernel/lib/z80fixedbank.s
Kernel/process.c