1 /* $Id: continue.c,v 1.5 2004/08/15 16:39:11 chorns Exp $
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: ntoskrnl/ps/i386/continue.c
6 * PURPOSE: i386 implementation of NtContinue()
7 * PROGRAMMER: Royce Mitchell III, kjk_hyperion
12 /* INCLUDES ****************************************************************/
16 #include <internal/debug.h>
20 KeRosTrapReturn ( PKTRAP_FRAME TrapFrame
, PKTRAP_FRAME PrevTrapFrame
);
23 KeRosDumpStackFrames ( PULONG Frame
, ULONG FrameCount
);
33 PKTRAP_FRAME TrapFrame
= KeGetCurrentThread()->TrapFrame
;
34 PKTRAP_FRAME PrevTrapFrame
= (PKTRAP_FRAME
)TrapFrame
->Edx
;
36 DPRINT("NtContinue: Context: Eip=0x%x, Esp=0x%x\n", Context
->Eip
, Context
->Esp
);
38 __asm__("mov %%ebp, %%ebx" : "=b" (Frame
) : );
39 DPRINT( "NtContinue(): Ebp=%x, prev/TF=%x/%x\n", Frame
, Frame
[0], TrapFrame
);
41 KeRosDumpStackFrames(NULL
,5);
44 if ( Context
== NULL
)
46 DPRINT1("NtContinue called with NULL Context\n");
47 return STATUS_INVALID_PARAMETER
;
50 if ( TrapFrame
== NULL
)
52 CPRINT("NtContinue called but TrapFrame was NULL\n");
57 * Copy the supplied context over the register information that was saved
58 * on entry to kernel mode, it will then be restored on exit
59 * FIXME: Validate the context
61 KeContextToTrapFrame ( Context
, TrapFrame
);
63 KeRosTrapReturn ( TrapFrame
, PrevTrapFrame
);
65 return STATUS_SUCCESS
; /* this doesn't actually happen b/c KeRosTrapReturn() won't return */