2 * FILE: ntoskrnl/ke/i386/tskswitch.S
3 * PURPOSE: Microkernel thread support
4 * PROGRAMMER: David Welch (welch@cwcom.net)
9 /* INCLUDES ******************************************************************/
12 /* FUNCTIONS ****************************************************************/
15 * FUNCTION: KeStackSwitchAndRet
16 * PURPOSE: Switch to a new stack and return from the first frame on
17 * the new stack which was assumed to a stdcall function with
18 * 8 bytes of arguments and which saved edi, esi and ebx.
20 .globl _KeStackSwitchAndRet@4
21 _KeStackSwitchAndRet@4:
38 .globl _KePushAndStackSwitchAndSysRet@8
39 _KePushAndStackSwitchAndSysRet@8:
51 movl %fs:KPCR_CURRENT_THREAD, %ebx
52 movl %esp, KTHREAD_CALLBACK_STACK(%ebx)