Author: tkreuzer
Date: Mon Nov 18 17:23:04 2013
New Revision: 61040
URL:
http://svn.reactos.org/svn/reactos?rev=61040&view=rev
Log:
[NTOSKRNK]
Implement KiCallbackReturnHandler
Modified:
trunk/reactos/ntoskrnl/ke/i386/traphdlr.c
Modified: trunk/reactos/ntoskrnl/ke/i386/traphdlr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/traphdlr.…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] Mon Nov 18 17:23:04 2013
@@ -236,7 +236,7 @@
IN PFX_SAVE_AREA SaveArea)
{
ULONG Cr0, Mask, Error, ErrorOffset, DataOffset;
-
+
/* Check for VDM trap */
ASSERT((KiVdmTrap(TrapFrame)) == FALSE);
@@ -245,7 +245,7 @@
{
/* Kernel might've tripped a delayed error */
SaveArea->Cr0NpxState |= CR0_TS;
-
+
/* Only valid if it happened during a restore */
//if ((PVOID)TrapFrame->Eip == FrRestore)
{
@@ -1455,7 +1455,16 @@
FASTCALL
KiCallbackReturnHandler(IN PKTRAP_FRAME TrapFrame)
{
- UNIMPLEMENTED_DBGBREAK();
+ NTSTATUS Status;
+
+ /* Pass the register parameters to NtCallbackReturn.
+ Result pointer is in ecx, result length in edx, status in eax */
+ Status = NtCallbackReturn((PVOID)TrapFrame->Ecx,
+ TrapFrame->Edx,
+ TrapFrame->Eax);
+
+ /* If we got here, something went wrong. Return an error to the caller */
+ KiServiceExit(TrapFrame, Status);
}
DECLSPEC_NORETURN
@@ -1567,7 +1576,7 @@
/* Decode the system call number */
Offset = (SystemCallNumber >> SERVICE_TABLE_SHIFT) & SERVICE_TABLE_MASK;
Id = SystemCallNumber & SERVICE_NUMBER_MASK;
-
+
/* Get descriptor table */
DescriptorTable = (PVOID)((ULONG_PTR)Thread->ServiceTable + Offset);