Author: fireball
Date: Sun Jun 29 03:20:08 2008
New Revision: 34173
URL:
http://svn.reactos.org/svn/reactos?rev=34173&view=rev
Log:
- Merge 34167,34171-34172.
Modified:
branches/ros-branch-0_3_5/reactos/dll/win32/kernel32/mem/procmem.c
branches/ros-branch-0_3_5/reactos/ntoskrnl/ke/apc.c
branches/ros-branch-0_3_5/reactos/ntoskrnl/mm/virtual.c
Modified: branches/ros-branch-0_3_5/reactos/dll/win32/kernel32/mem/procmem.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_5/reactos/dll/wi…
==============================================================================
--- branches/ros-branch-0_3_5/reactos/dll/win32/kernel32/mem/procmem.c [iso-8859-1]
(original)
+++ branches/ros-branch-0_3_5/reactos/dll/win32/kernel32/mem/procmem.c [iso-8859-1] Sun
Jun 29 03:20:08 2008
@@ -79,7 +79,7 @@
PAGE_WRITECOPY |
PAGE_EXECUTE_READWRITE |
PAGE_EXECUTE_WRITECOPY) ? FALSE : TRUE;
- if (UnProtect)
+ if (!UnProtect)
{
/* Set the new protection */
Status = NtProtectVirtualMemory(hProcess,
Modified: branches/ros-branch-0_3_5/reactos/ntoskrnl/ke/apc.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_5/reactos/ntoskr…
==============================================================================
--- branches/ros-branch-0_3_5/reactos/ntoskrnl/ke/apc.c [iso-8859-1] (original)
+++ branches/ros-branch-0_3_5/reactos/ntoskrnl/ke/apc.c [iso-8859-1] Sun Jun 29 03:20:08
2008
@@ -212,9 +212,24 @@
}
else if (Thread->State == GateWait)
{
- /* We were in a gate wait. FIXME: Handle this */
- DPRINT1("Not yet supported -- Report this to Alex\n");
- while (TRUE);
+ /* We were in a gate wait. Handle this. */
+ DPRINT1("A thread was in a gate wait\n");
+
+ /* Lock the gate */
+ KiAcquireDispatcherObject(&Thread->GateObject->Header);
+
+ /* Remove it from the waiters list */
+ RemoveEntryList(&Thread->WaitBlock[0].WaitListEntry);
+
+ /* Unlock the gate */
+ KiReleaseDispatcherObject(&Thread->GateObject->Header);
+
+ /* Increase the queue counter if needed */
+ if (Thread->Queue) Thread->Queue->CurrentCount++;
+
+ /* Put into deferred ready list with this status */
+ Status = STATUS_KERNEL_APC;
+ KiInsertDeferredReadyList(Thread);
}
}
else if ((Thread->State == Waiting) &&
@@ -867,7 +882,7 @@
/* Acquire the dispatcher lock and remove it from the list */
KiAcquireDispatcherLockAtDpcLevel();
- if (RemoveEntryList(&ApcState->ApcListHead[Apc->ApcMode]))
+ if (RemoveEntryList(&Apc->ApcListEntry))
{
/* Set the correct state based on the APC Mode */
if (Apc->ApcMode == KernelMode)
Modified: branches/ros-branch-0_3_5/reactos/ntoskrnl/mm/virtual.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_5/reactos/ntoskr…
==============================================================================
--- branches/ros-branch-0_3_5/reactos/ntoskrnl/mm/virtual.c [iso-8859-1] (original)
+++ branches/ros-branch-0_3_5/reactos/ntoskrnl/mm/virtual.c [iso-8859-1] Sun Jun 29
03:20:08 2008
@@ -172,7 +172,7 @@
{
/* Exit */
Status = _SEH_GetExceptionCode();
- _SEH_YIELD();
+ _SEH_YIELD(return Status);
}
/* Otherwise, we failed probably during the move */
@@ -319,7 +319,7 @@
{
/* Exit */
Status = _SEH_GetExceptionCode();
- _SEH_YIELD();
+ _SEH_YIELD(return Status);
}
/* Otherwise, we failed probably during the move */