1 /* $Id: continue.c,v 1.2 2004/07/02 01:23:26 royce 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 ****************************************************************/
14 #include <ddk/ntddk.h>
15 #include <internal/ke.h>
16 #include <internal/ob.h>
17 #include <internal/ps.h>
18 #include <internal/ob.h>
19 #include <internal/pool.h>
20 #include <ntos/minmax.h>
21 #include <internal/ldr.h>
22 #include <rosrtl/string.h>
25 #include <internal/debug.h>
29 KeRosTrapReturn ( PKTRAP_FRAME TrapFrame
, PKTRAP_FRAME PrevTrapFrame
);
32 KeRosDumpStackFrames ( PULONG Frame
, ULONG FrameCount
);
42 PKTRAP_FRAME TrapFrame
= KeGetCurrentThread()->TrapFrame
;
43 PKTRAP_FRAME PrevTrapFrame
= (PKTRAP_FRAME
)TrapFrame
->Edx
;
45 DPRINT1("NtContinue: Context: Eip=0x%x, Esp=0x%x\n", Context
->Eip
, Context
->Esp
);
47 __asm__("mov %%ebp, %%ebx" : "=b" (Frame
) : );
48 DbgPrint ( "NtContinue(): Ebp=%x, prev/TF=%x/%x\n", Frame
, Frame
[0], TrapFrame
);
49 KeRosDumpStackFrames(NULL
,5);
51 if ( Context
== NULL
)
53 DPRINT1("NtContinue called with NULL Context\n");
54 return STATUS_INVALID_PARAMETER
;
57 if ( TrapFrame
== NULL
)
59 CPRINT("NtContinue called but TrapFrame was NULL\n");
64 * Copy the supplied context over the register information that was saved
65 * on entry to kernel mode, it will then be restored on exit
66 * FIXME: Validate the context
68 KeContextToTrapFrame ( Context
, TrapFrame
);
70 KeRosTrapReturn ( TrapFrame
, PrevTrapFrame
);
72 return STATUS_SUCCESS
; /* this doesn't actually happen b/c KeRosTrapReturn() won't return */