Author: sginsberg
Date: Sun Jan 4 11:33:47 2009
New Revision: 38568
URL: http://svn.reactos.org/svn/reactos?rev=38568&view=rev
Log:
- DbgkpSendApiMessage/DbgkpSendApiMessageLpc: Make sure the process is suspended before resuming it. Also, DbgkpSendApiMessage takes a BOOLEAN as 2nd parameter.
- DbgkpWakeTarget: Correct a check for a Debug Event flag
Modified:
trunk/reactos/ntoskrnl/dbgk/dbgkobj.c
trunk/reactos/ntoskrnl/include/internal/dbgk.h
Modified: trunk/reactos/ntoskrnl/dbgk/dbgkobj.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/dbgk/dbgkobj.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/dbgk/dbgkobj.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/dbgk/dbgkobj.c [iso-8859-1] Sun Jan 4 11:33:47 2009
@@ -209,10 +209,11 @@
{
NTSTATUS Status;
UCHAR Buffer[PORT_MAXIMUM_MESSAGE_LENGTH];
+ BOOLEAN Suspended = FALSE;
PAGED_CODE();
/* Suspend process if required */
- if (SuspendProcess) DbgkpSuspendProcess();
+ if (SuspendProcess) Suspended = DbgkpSuspendProcess();
/* Set return status */
Message->ReturnedStatus = STATUS_PENDING;
@@ -232,21 +233,22 @@
if (NT_SUCCESS(Status)) RtlCopyMemory(Message, Buffer, sizeof(DBGKM_MSG));
/* Resume the process if it was suspended */
- if (SuspendProcess) DbgkpResumeProcess();
+ if (Suspended) DbgkpResumeProcess();
return Status;
}
NTSTATUS
NTAPI
DbgkpSendApiMessage(IN OUT PDBGKM_MSG ApiMsg,
- IN ULONG Flags)
+ IN BOOLEAN SuspendProcess)
{
NTSTATUS Status;
+ BOOLEAN Suspended = FALSE;
PAGED_CODE();
- DBGKTRACE(DBGK_MESSAGE_DEBUG, "ApiMsg: %p Flags: %lx\n", ApiMsg, Flags);
+ DBGKTRACE(DBGK_MESSAGE_DEBUG, "ApiMsg: %p SuspendProcess: %lx\n", ApiMsg, SuspendProcess);
/* Suspend process if required */
- if (Flags) DbgkpSuspendProcess();
+ if (SuspendProcess) Suspended = DbgkpSuspendProcess();
/* Set return status */
ApiMsg->ReturnedStatus = STATUS_PENDING;
@@ -265,7 +267,7 @@
ZwFlushInstructionCache(NtCurrentProcess(), NULL, 0);
/* Resume the process if it was suspended */
- if (Flags) DbgkpResumeProcess();
+ if (Suspended) DbgkpResumeProcess();
return Status;
}
@@ -426,7 +428,7 @@
DBGKTRACE(DBGK_OBJECT_DEBUG, "DebugEvent: %p\n", DebugEvent);
/* Check if we have to wake the thread */
- if (DebugEvent->Flags & 20) PsResumeThread(Thread, NULL);
+ if (DebugEvent->Flags & 0x20) PsResumeThread(Thread, NULL);
/* Check if we had locked the thread */
if (DebugEvent->Flags & 8)
Modified: trunk/reactos/ntoskrnl/include/internal/dbgk.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/dbgk.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/dbgk.h [iso-8859-1] Sun Jan 4 11:33:47 2009
@@ -102,7 +102,7 @@
NTAPI
DbgkpSendApiMessage(
IN OUT PDBGKM_MSG ApiMsg,
- IN ULONG Flags
+ IN BOOLEAN SuspendProcess
);
HANDLE
Author: fireball
Date: Sun Jan 4 09:11:47 2009
New Revision: 38565
URL: http://svn.reactos.org/svn/reactos?rev=38565&view=rev
Log:
- Rewrite SystemTimeOfDay QuerySystemInformation case. ReqSize is the amount of data copied to the user so use it accordingly. Also, fill up the buffer as much as the caller requested. Fixes 1 "ntdll_winetest.exe info".
- Use a newer (5.0 and higher) version of SYSTEM_TIMEOFDAY_INFORMATION structure (consisting of two additional 64 bits fields: boot time bias and sleep time bias).
Modified:
trunk/reactos/include/ndk/extypes.h
trunk/reactos/ntoskrnl/ex/sysinfo.c
Modified: trunk/reactos/include/ndk/extypes.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/extypes.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/extypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/extypes.h [iso-8859-1] Sun Jan 4 09:11:47 2009
@@ -817,6 +817,10 @@
LARGE_INTEGER TimeZoneBias;
ULONG TimeZoneId;
ULONG Reserved;
+#if (NTDDI_VERSION >= NTDDI_WIN2K)
+ ULONGLONG BootTimeBias;
+ ULONGLONG SleepTimeBias;
+#endif
} SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION;
// Class 4
Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sysinfo.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] Sun Jan 4 09:11:47 2009
@@ -663,25 +663,36 @@
/* Class 3 - Time Of Day Information */
QSI_DEF(SystemTimeOfDayInformation)
{
- PSYSTEM_TIMEOFDAY_INFORMATION Sti;
+ SYSTEM_TIMEOFDAY_INFORMATION Sti;
LARGE_INTEGER CurrentTime;
- Sti = (PSYSTEM_TIMEOFDAY_INFORMATION)Buffer;
- *ReqSize = sizeof (SYSTEM_TIMEOFDAY_INFORMATION);
+ /* Set amount of written information to 0 */
+ *ReqSize = 0;
/* Check user buffer's size */
- if (Size != sizeof (SYSTEM_TIMEOFDAY_INFORMATION))
- {
- return STATUS_INFO_LENGTH_MISMATCH;
- }
-
+ if (Size > sizeof(SYSTEM_TIMEOFDAY_INFORMATION))
+ {
+ return STATUS_INFO_LENGTH_MISMATCH;
+ }
+
+ /* Get current time */
KeQuerySystemTime(&CurrentTime);
- Sti->BootTime= KeBootTime;
- Sti->CurrentTime = CurrentTime;
- Sti->TimeZoneBias.QuadPart = ExpTimeZoneBias.QuadPart;
- Sti->TimeZoneId = ExpTimeZoneId;
- Sti->Reserved = 0;
+ /* Zero local buffer */
+ RtlZeroMemory(&Sti, sizeof(SYSTEM_TIMEOFDAY_INFORMATION));
+
+ /* Fill local time structure */
+ Sti.BootTime= KeBootTime;
+ Sti.CurrentTime = CurrentTime;
+ Sti.TimeZoneBias.QuadPart = ExpTimeZoneBias.QuadPart;
+ Sti.TimeZoneId = ExpTimeZoneId;
+ Sti.Reserved = 0;
+
+ /* Copy as much as requested by caller */
+ RtlCopyMemory(Buffer, &Sti, Size);
+
+ /* Set amount of information we copied */
+ *ReqSize = Size;
return STATUS_SUCCESS;
}
Author: dgorbachev
Date: Sun Jan 4 08:40:27 2009
New Revision: 38564
URL: http://svn.reactos.org/svn/reactos?rev=38564&view=rev
Log:
Add type casts to RtlpCallQueryRegistryRoutine().
Modified:
trunk/reactos/lib/rtl/registry.c
Modified: trunk/reactos/lib/rtl/registry.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/registry.c?rev=385…
==============================================================================
--- trunk/reactos/lib/rtl/registry.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/registry.c [iso-8859-1] Sun Jan 4 08:40:27 2009
@@ -157,7 +157,7 @@
}
/* We can setup a default value... capture the defaults */
- Name = QueryTable->Name;
+ Name = (PWCHAR)QueryTable->Name;
Type = QueryTable->DefaultType;
Data = QueryTable->DefaultData;
Length = QueryTable->DefaultLength;
@@ -224,7 +224,7 @@
else
{
/* Just return the name */
- Name = QueryTable->Name;
+ Name = (PWCHAR)QueryTable->Name;
}
/* Capture key data */