[prev in list] [next in list] [prev in thread] [next in thread]
List: ros-diffs
Subject: [ros-diffs] [ion] 13777: Reverting to 13775. Sorry for the mess.
From: <ion () svn ! reactos ! com>
Date: 2005-02-28 17:40:19
Message-ID: 000001c51dbc$922d8100$6601a8c0 () penelope
[Download RAW message or body]
Reverting to 13775. Sorry for the mess. This is dedicated to Jane!
19934415.
Modified: trunk/reactos/config
Modified: trunk/reactos/drivers/storage/floppy/floppy.c
Modified: trunk/reactos/include/ddk/extypes.h
Modified: trunk/reactos/include/ddk/iotypes.h
Modified: trunk/reactos/include/ddk/ketypes.h
Modified: trunk/reactos/include/ntos/zwtypes.h
Modified: trunk/reactos/lib/ntdll/def/ntdll.def
Modified: trunk/reactos/ntoskrnl/Makefile
Modified: trunk/reactos/ntoskrnl/cm/registry.c
Deleted: trunk/reactos/ntoskrnl/ex/error.c
Modified: trunk/reactos/ntoskrnl/ex/event.c
Modified: trunk/reactos/ntoskrnl/ex/evtpair.c
Modified: trunk/reactos/ntoskrnl/ex/init.c
Modified: trunk/reactos/ntoskrnl/ex/mutant.c
Modified: trunk/reactos/ntoskrnl/ex/rundown.c
Modified: trunk/reactos/ntoskrnl/ex/sem.c
Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c
Modified: trunk/reactos/ntoskrnl/ex/timer.c
Modified: trunk/reactos/ntoskrnl/ex/work.c
Modified: trunk/reactos/ntoskrnl/include/internal/ex.h
Modified: trunk/reactos/ntoskrnl/include/internal/id.h
Modified: trunk/reactos/ntoskrnl/include/internal/io.h
Modified: trunk/reactos/ntoskrnl/include/internal/ke.h
Modified: trunk/reactos/ntoskrnl/include/internal/nls.h
Modified: trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h
Modified: trunk/reactos/ntoskrnl/include/internal/ps.h
Modified: trunk/reactos/ntoskrnl/io/bootlog.c
Modified: trunk/reactos/ntoskrnl/io/create.c
Modified: trunk/reactos/ntoskrnl/io/driver.c
Modified: trunk/reactos/ntoskrnl/io/iocomp.c
Modified: trunk/reactos/ntoskrnl/io/iomgr.c
Modified: trunk/reactos/ntoskrnl/io/wmi.c
Added: trunk/reactos/ntoskrnl/ke/alert.c
Modified: trunk/reactos/ntoskrnl/ke/apc.c
Modified: trunk/reactos/ntoskrnl/ke/bug.c
Modified: trunk/reactos/ntoskrnl/ke/catch.c
Added: trunk/reactos/ntoskrnl/ke/critical.c
Modified: trunk/reactos/ntoskrnl/ke/dpc.c
Added: trunk/reactos/ntoskrnl/ke/error.c
Modified: trunk/reactos/ntoskrnl/ke/event.c
Modified: trunk/reactos/ntoskrnl/ke/i386/tskswitch.S
Modified: trunk/reactos/ntoskrnl/ke/kthread.c
Modified: trunk/reactos/ntoskrnl/ke/main.c
Modified: trunk/reactos/ntoskrnl/ke/mutex.c
Modified: trunk/reactos/ntoskrnl/ke/queue.c
Modified: trunk/reactos/ntoskrnl/ke/sem.c
Modified: trunk/reactos/ntoskrnl/ke/timer.c
Modified: trunk/reactos/ntoskrnl/ke/wait.c
Modified: trunk/reactos/ntoskrnl/ntoskrnl.def
Modified: trunk/reactos/ntoskrnl/ntoskrnl.mc
Deleted: trunk/reactos/ntoskrnl/ob/wait.c
Modified: trunk/reactos/ntoskrnl/ps/kill.c
Modified: trunk/reactos/ntoskrnl/ps/process.c
Modified: trunk/reactos/ntoskrnl/ps/thread.c
Modified: trunk/reactos/ntoskrnl/rtl/nls.c
Modified: trunk/reactos/tools/nci/sysfuncs.lst
_____
Modified: trunk/reactos/config
--- trunk/reactos/config 2005-02-28 16:44:38 UTC (rev 13776)
+++ trunk/reactos/config 2005-02-28 17:40:15 UTC (rev 13777)
@@ -15,7 +15,7 @@
# be optimze for.
#
-OARCH := pentium2
+OARCH := i486
#
# Whether to compile in the kernel debugger
@@ -30,7 +30,7 @@
#
# Whether to compile with optimizations
#
-OPTIMIZED := 1
+OPTIMIZED := 0
#
# Whether to compile a multiprocessor or single processor version
_____
Modified: trunk/reactos/drivers/storage/floppy/floppy.c
--- trunk/reactos/drivers/storage/floppy/floppy.c 2005-02-28
16:44:38 UTC (rev 13776)
+++ trunk/reactos/drivers/storage/floppy/floppy.c 2005-02-28
17:40:15 UTC (rev 13777)
@@ -58,7 +58,7 @@
/* Queue thread management */
static KEVENT QueueThreadTerminate;
-static PVOID QueueThreadObject;
+static PVOID ThreadObject;
static VOID NTAPI MotorStopDpcFunc(PKDPC UnusedDpc,
@@ -378,8 +378,8 @@
KdPrint(("floppy: unloading\n"));
KeSetEvent(&QueueThreadTerminate, 0, FALSE);
- KeWaitForSingleObject(QueueThreadObject, Executive, KernelMode,
FALSE, 0);
- ObDereferenceObject(QueueThreadObject);
+ KeWaitForSingleObject(ThreadObject, Executive, KernelMode, FALSE, 0);
+ ObDereferenceObject(ThreadObject);
for(i = 0; i < gNumberOfControllers; i++)
{
@@ -1152,7 +1152,7 @@
return STATUS_INSUFFICIENT_RESOURCES;
}
- if(ObReferenceObjectByHandle(ThreadHandle, STANDARD_RIGHTS_ALL, NULL,
KernelMode, &QueueThreadObject, NULL) != STATUS_SUCCESS)
+ if(ObReferenceObjectByHandle(ThreadHandle, STANDARD_RIGHTS_ALL, NULL,
KernelMode, &ThreadObject, NULL) != STATUS_SUCCESS)
{
KdPrint(("floppy: Unable to reference returned thread handle;
failing init\n"));
return STATUS_UNSUCCESSFUL;
_____
Modified: trunk/reactos/include/ddk/extypes.h
--- trunk/reactos/include/ddk/extypes.h 2005-02-28 16:44:38 UTC (rev
13776)
+++ trunk/reactos/include/ddk/extypes.h 2005-02-28 17:40:15 UTC (rev
13777)
@@ -30,23 +30,6 @@
MaximumWorkQueue
} WORK_QUEUE_TYPE;
-typedef struct _EX_QUEUE_WORKER_INFO {
- UCHAR QueueDisabled:1;
- UCHAR MakeThreadsAsNecessary:1;
- UCHAR WaitMode:1;
- ULONG WorkerCount:29;
-} EX_QUEUE_WORKER_INFO, *PEX_QUEUE_WORKER_INFO;
-
-typedef struct _EX_WORK_QUEUE {
- KQUEUE WorkerQueue;
- ULONG DynamicThreadCount;
- ULONG WorkItemsProcessed;
- ULONG WorkItemsProcessedLastPass;
- ULONG QueueDepthLastPass;
- EX_QUEUE_WORKER_INFO Info;
-} EX_WORK_QUEUE, *PEX_WORK_QUEUE;
-
-
typedef ULONG_PTR ERESOURCE_THREAD, *PERESOURCE_THREAD;
typedef struct _OWNER_ENTRY
@@ -257,10 +240,6 @@
PVOID Argument1,
PVOID Argument2);
-extern struct _OBJECT_TYPE EXPORTED *ExMutantObjectType;
-extern struct _OBJECT_TYPE EXPORTED *ExSemaphoreObjectType;
-extern struct _OBJECT_TYPE EXPORTED *ExTimerType;
-
#endif /* __INCLUDE_DDK_EXTYPES_H */
/* EOF */
_____
Modified: trunk/reactos/include/ddk/iotypes.h
--- trunk/reactos/include/ddk/iotypes.h 2005-02-28 16:44:38 UTC (rev
13776)
+++ trunk/reactos/include/ddk/iotypes.h 2005-02-28 17:40:15 UTC (rev
13777)
@@ -886,8 +886,6 @@
#endif
#define IO_TYPE_DRIVER 4L
-#define IO_TYPE_FILE 0x0F5L
-
#define DRVO_UNLOAD_INVOKED 0x1L
#define DRVO_LEGACY_DRIVER 0x2L
#define DRVO_BUILTIN_DRIVER 0x4L
_____
Modified: trunk/reactos/include/ddk/ketypes.h
--- trunk/reactos/include/ddk/ketypes.h 2005-02-28 16:44:38 UTC (rev
13776)
+++ trunk/reactos/include/ddk/ketypes.h 2005-02-28 17:40:15 UTC (rev
13777)
@@ -36,34 +36,23 @@
struct _DISPATCHER_HEADER;
-typedef enum _KOBJECTS {
- EventNotificationObject = 0,
- EventSynchronizationObject = 1,
- MutantObject = 2,
- ProcessObject = 3,
- QueueObject = 4,
- SemaphoreObject = 5,
- ThreadObject = 6,
- GateObject = 7,
- TimerNotificationObject = 8,
- TimerSynchronizationObject = 9,
- Spare2Object = 10,
- Spare3Object = 11,
- Spare4Object = 12,
- Spare5Object = 13,
- Spare6Object = 14,
- Spare7Object = 15,
- Spare8Object = 16,
- Spare9Object = 17,
- ApcObject = 18,
- DpcObject = 19,
- DeviceQueueObject = 20,
- EventPairObject = 21,
- InterruptObject = 22,
- ProfileObject = 23,
- ThreadedDpcObject = 24,
- MaximumKernelObject = 25
-} KOBJECTS;
+typedef enum _KERNEL_OBJECTS {
+ KNotificationEvent = 0,
+ KSynchronizationEvent = 1,
+ KMutant = 2,
+ KProcess = 3,
+ KQueue = 4,
+ KSemaphore = 5,
+ KThread = 6,
+ KNotificationTimer = 8,
+ KSynchronizationTimer = 9,
+ KApc = 18,
+ KDpc = 19,
+ KDeviceQueue = 20,
+ KEventPair = 21,
+ KInterrupt = 22,
+ KProfile = 23
+} KERNEL_OBJECTS;
#include <pshpack1.h>
_____
Modified: trunk/reactos/include/ntos/zwtypes.h
--- trunk/reactos/include/ntos/zwtypes.h 2005-02-28 16:44:38 UTC
(rev 13776)
+++ trunk/reactos/include/ntos/zwtypes.h 2005-02-28 17:40:15 UTC
(rev 13777)
@@ -1262,9 +1262,9 @@
typedef struct _MUTANT_BASIC_INFORMATION
{
- LONG CurrentCount;
- BOOLEAN OwnedByCaller;
- BOOLEAN AbandonedState;
+ LONG Count;
+ BOOLEAN Owned;
+ BOOLEAN Abandoned;
} MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
_____
Modified: trunk/reactos/lib/ntdll/def/ntdll.def
--- trunk/reactos/lib/ntdll/def/ntdll.def 2005-02-28 16:44:38 UTC
(rev 13776)
+++ trunk/reactos/lib/ntdll/def/ntdll.def 2005-02-28 17:40:15 UTC
(rev 13777)
@@ -225,6 +225,7 @@
NtSetEvent@8
NtSetHighEventPair@4
NtSetHighWaitLowEventPair@4
+NtSetHighWaitLowThread@0
NtSetInformationFile@20
NtSetInformationJobObject@16
NtSetInformationKey@16
@@ -237,6 +238,7 @@
NtSetLdtEntries@24
NtSetLowEventPair@4
NtSetLowWaitHighEventPair@4
+NtSetLowWaitHighThread@0
NtSetSecurityObject@12
NtSetSystemEnvironmentValue@8
NtSetSystemInformation@12
@@ -847,6 +849,7 @@
ZwSetEvent@8
ZwSetHighEventPair@4
ZwSetHighWaitLowEventPair@4
+ZwSetHighWaitLowThread@0
ZwSetInformationFile@20
ZwSetInformationKey@16
ZwSetInformationObject@16
@@ -858,6 +861,7 @@
ZwSetLdtEntries@24
ZwSetLowEventPair@4
ZwSetLowWaitHighEventPair@4
+ZwSetLowWaitHighThread@0
ZwSetSecurityObject@12
ZwSetSystemEnvironmentValue@8
ZwSetSystemInformation@12
_____
Modified: trunk/reactos/ntoskrnl/Makefile
--- trunk/reactos/ntoskrnl/Makefile 2005-02-28 16:44:38 UTC (rev
13776)
+++ trunk/reactos/ntoskrnl/Makefile 2005-02-28 17:40:15 UTC (rev
13777)
@@ -101,8 +101,10 @@
ke/bug.o \
ke/catch.o \
ke/clock.o \
+ ke/critical.o \
ke/dpc.o \
ke/device.o \
+ ke/error.o \
ke/event.o \
ke/kqueue.o \
ke/kthread.o \
@@ -116,6 +118,7 @@
ke/spinlock.o \
ke/timer.o \
ke/wait.o \
+ ke/alert.o
# Memory Manager (Mm)
OBJECTS_MM = \
@@ -216,8 +219,7 @@
ob/object.o \
ob/sdcache.o \
ob/security.o \
- ob/symlink.o \
- ob/wait.o
+ ob/symlink.o
# Process Manager (Ps)
OBJECTS_PS = \
@@ -240,7 +242,6 @@
OBJECTS_EX = \
ex/btree.o \
ex/callback.o \
- ex/error.o \
ex/event.o \
ex/evtpair.o \
ex/fmutex.o \
_____
Modified: trunk/reactos/ntoskrnl/cm/registry.c
--- trunk/reactos/ntoskrnl/cm/registry.c 2005-02-28 16:44:38 UTC
(rev 13776)
+++ trunk/reactos/ntoskrnl/cm/registry.c 2005-02-28 17:40:15 UTC
(rev 13777)
@@ -241,30 +241,7 @@
CmiCheckByName(Verbose, L"User");
}
-VOID
-INIT_FUNCTION
-STDCALL
-CmInitHives(BOOLEAN SetupBoot)
-{
- PCHAR BaseAddress;
-
- /* Load Registry Hives */
- BaseAddress = (PCHAR)CachedModules[SystemRegistry]->ModStart;
- CmImportSystemHive(BaseAddress,
- CachedModules[SystemRegistry]->ModEnd -
(ULONG_PTR)BaseAddress);
-
- BaseAddress = (PCHAR)CachedModules[HardwareRegistry]->ModStart;
- CmImportHardwareHive(BaseAddress,
- CachedModules[HardwareRegistry]->ModEnd -
(ULONG_PTR)BaseAddress);
-
- /* Create dummy keys if no hardware hive was found */
- CmImportHardwareHive (NULL, 0);
-
- /* Initialize volatile registry settings */
- if (SetupBoot == FALSE) CmInit2((PCHAR)KeLoaderBlock.CommandLine);
-}
-
VOID INIT_FUNCTION
CmInitializeRegistry(VOID)
{
_____
Deleted: trunk/reactos/ntoskrnl/ex/error.c
--- trunk/reactos/ntoskrnl/ex/error.c 2005-02-28 16:44:38 UTC (rev
13776)
+++ trunk/reactos/ntoskrnl/ex/error.c 2005-02-28 17:40:15 UTC (rev
13777)
@@ -1,163 +0,0 @@
-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: ntoskrnl/ex/error.c
- * PURPOSE: Error Functions and Status/Exception
Dispatching/Raising
- *
- * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) - Created File
- */
-
-/* INCLUDES
*****************************************************************/
-
-#include <ntoskrnl.h>
-#define NDEBUG
-#include <internal/debug.h>
-
-/* GLOBALS
****************************************************************/
-
-BOOLEAN ExReadyForErrors = FALSE;
-PEPORT ExpDefaultErrorPort = NULL;
-PEPROCESS ExpDefaultErrorPortProcess = NULL;
-
-/* FUNCTIONS
****************************************************************/
-
-/*
- * @implemented
- */
-VOID
-STDCALL
-ExRaiseAccessViolation(VOID)
-{
- /* Raise the Right Status */
- ExRaiseStatus (STATUS_ACCESS_VIOLATION);
-}
-
-/*
- * @implemented
- */
-VOID
-STDCALL
-ExRaiseDatatypeMisalignment (VOID)
-{
- /* Raise the Right Status */
- ExRaiseStatus (STATUS_DATATYPE_MISALIGNMENT);
-}
-
-/*
- * @implemented
- */
-VOID
-STDCALL
-ExRaiseStatus(IN NTSTATUS Status)
-{
- EXCEPTION_RECORD ExceptionRecord;
-
- DPRINT("ExRaiseStatus(%x)\n", Status);
-
- /* Set up an Exception Record */
- ExceptionRecord.ExceptionRecord = NULL;
- ExceptionRecord.NumberParameters = 0;
- ExceptionRecord.ExceptionCode = Status;
- ExceptionRecord.ExceptionFlags = 0;
-
- /* Call the Rtl Function */
- RtlRaiseException(&ExceptionRecord);
-}
-
-/*
- * @implemented
- */
-VOID
-STDCALL
-ExRaiseException (PEXCEPTION_RECORD ExceptionRecord)
-{
- /* Call the Rtl function */
- RtlRaiseException(ExceptionRecord);
-}
-
-/*
- * @implemented
- */
-BOOLEAN
-STDCALL
-ExSystemExceptionFilter(VOID)
-{
- return KeGetPreviousMode() != KernelMode ?
EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH;
-}
-
-/*
- * @unimplemented
- */
-VOID
-STDCALL
-ExRaiseHardError(IN NTSTATUS ErrorStatus,
- IN ULONG NumberOfParameters,
- IN PUNICODE_STRING UnicodeStringParameterMask
OPTIONAL,
- IN PVOID *Parameters,
- IN HARDERROR_RESPONSE_OPTION ResponseOption,
- OUT PHARDERROR_RESPONSE Response)
-{
- UNIMPLEMENTED;
-}
-
-NTSTATUS
-STDCALL
-NtRaiseHardError(IN NTSTATUS ErrorStatus,
- IN ULONG NumberOfParameters,
- IN PUNICODE_STRING UnicodeStringParameterMask
OPTIONAL,
- IN PVOID *Parameters,
- IN HARDERROR_RESPONSE_OPTION ResponseOption,
- OUT PHARDERROR_RESPONSE Response)
-{
- DPRINT1("Hard error %x\n", ErrorStatus);
-
- /* Call the Executive Function (WE SHOULD PUT SEH HERE/CAPTURE!) */
- ExRaiseHardError(ErrorStatus,
- NumberOfParameters,
- UnicodeStringParameterMask,
- Parameters,
- ResponseOption,
- Response);
-
- /* Return Success */
- return STATUS_SUCCESS;
-}
-
-NTSTATUS
-STDCALL
-NtSetDefaultHardErrorPort(IN HANDLE PortHandle)
-{
-
- KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
- NTSTATUS Status = STATUS_UNSUCCESSFUL;
-
- /* Check if we have the Privilege */
- if(!SeSinglePrivilegeCheck(SeTcbPrivilege, PreviousMode)) {
-
- DPRINT1("NtSetDefaultHardErrorPort: Caller requires the
SeTcbPrivilege privilege!\n");
- return STATUS_PRIVILEGE_NOT_HELD;
- }
-
- /* Only called once during bootup, make sure we weren't called yet
*/
- if(!ExReadyForErrors) {
-
- Status = ObReferenceObjectByHandle(PortHandle,
- 0,
- LpcPortObjectType,
- PreviousMode,
-
(PVOID*)&ExpDefaultErrorPort,
- NULL);
-
- /* Check for Success */
- if(NT_SUCCESS(Status)) {
-
- /* Save the data */
- ExpDefaultErrorPortProcess = PsGetCurrentProcess();
- ExReadyForErrors = TRUE;
- }
- }
-
- return Status;
-}
-
-/* EOF */
_____
Modified: trunk/reactos/ntoskrnl/ex/event.c
--- trunk/reactos/ntoskrnl/ex/event.c 2005-02-28 16:44:38 UTC (rev
13776)
+++ trunk/reactos/ntoskrnl/ex/event.c 2005-02-28 17:40:15 UTC (rev
13777)
@@ -19,286 +19,300 @@
POBJECT_TYPE EXPORTED ExEventObjectType = NULL;
static GENERIC_MAPPING ExpEventMapping = {
- STANDARD_RIGHTS_READ | SYNCHRONIZE | EVENT_QUERY_STATE,
- STANDARD_RIGHTS_WRITE | SYNCHRONIZE | EVENT_MODIFY_STATE,
- STANDARD_RIGHTS_EXECUTE | SYNCHRONIZE | EVENT_QUERY_STATE,
- EVENT_ALL_ACCESS};
+ STANDARD_RIGHTS_READ | SYNCHRONIZE | EVENT_QUERY_STATE,
+ STANDARD_RIGHTS_WRITE | SYNCHRONIZE | EVENT_MODIFY_STATE,
+ STANDARD_RIGHTS_EXECUTE | SYNCHRONIZE | EVENT_QUERY_STATE,
+ EVENT_ALL_ACCESS};
-static const INFORMATION_CLASS_INFO ExEventInfoClass[] = {
-
- /* EventBasicInformation */
- ICI_SQ_SAME( sizeof(EVENT_BASIC_INFORMATION), sizeof(ULONG),
ICIF_QUERY),
+static const INFORMATION_CLASS_INFO ExEventInfoClass[] =
+{
+ ICI_SQ_SAME( sizeof(EVENT_BASIC_INFORMATION), sizeof(ULONG),
ICIF_QUERY ), /* EventBasicInformation */
};
/* FUNCTIONS
*****************************************************************/
-VOID
-INIT_FUNCTION
+NTSTATUS STDCALL
+NtpCreateEvent(PVOID ObjectBody,
+ PVOID Parent,
+ PWSTR RemainingPath,
+ POBJECT_ATTRIBUTES ObjectAttributes)
+{
+ DPRINT("NtpCreateEvent(ObjectBody %x, Parent %x, RemainingPath
%S)\n",
+ ObjectBody, Parent, RemainingPath);
+
+ if (RemainingPath != NULL && wcschr(RemainingPath+1, '\\') != NULL)
+ {
+ return(STATUS_UNSUCCESSFUL);
+ }
+
+ return(STATUS_SUCCESS);
+}
+
+
+VOID INIT_FUNCTION
ExpInitializeEventImplementation(VOID)
{
- /* Create the Event Object Type */
- ExEventObjectType =
ExAllocatePool(NonPagedPool,sizeof(OBJECT_TYPE));
- RtlpCreateUnicodeString(&ExEventObjectType->TypeName, L"Event",
NonPagedPool);
- ExEventObjectType->Tag = TAG('E', 'V', 'T', 'T');
- ExEventObjectType->PeakObjects = 0;
- ExEventObjectType->PeakHandles = 0;
- ExEventObjectType->TotalObjects = 0;
- ExEventObjectType->TotalHandles = 0;
- ExEventObjectType->PagedPoolCharge = 0;
- ExEventObjectType->NonpagedPoolCharge = sizeof(KEVENT);
- ExEventObjectType->Mapping = &ExpEventMapping;
- ExEventObjectType->Dump = NULL;
- ExEventObjectType->Open = NULL;
- ExEventObjectType->Close = NULL;
- ExEventObjectType->Delete = NULL;
- ExEventObjectType->Parse = NULL;
- ExEventObjectType->Security = NULL;
- ExEventObjectType->QueryName = NULL;
- ExEventObjectType->OkayToClose = NULL;
- ExEventObjectType->Create = NULL;
- ExEventObjectType->DuplicationNotify = NULL;
- ObpCreateTypeObject(ExEventObjectType);
+ ExEventObjectType =
ExAllocatePool(NonPagedPool,sizeof(OBJECT_TYPE));
+
+ RtlpCreateUnicodeString(&ExEventObjectType->TypeName, L"Event",
NonPagedPool);
+
+ ExEventObjectType->Tag = TAG('E', 'V', 'T', 'T');
+ ExEventObjectType->PeakObjects = 0;
+ ExEventObjectType->PeakHandles = 0;
+ ExEventObjectType->TotalObjects = 0;
+ ExEventObjectType->TotalHandles = 0;
+ ExEventObjectType->PagedPoolCharge = 0;
+ ExEventObjectType->NonpagedPoolCharge = sizeof(KEVENT);
+ ExEventObjectType->Mapping = &ExpEventMapping;
+ ExEventObjectType->Dump = NULL;
+ ExEventObjectType->Open = NULL;
+ ExEventObjectType->Close = NULL;
+ ExEventObjectType->Delete = NULL;
+ ExEventObjectType->Parse = NULL;
+ ExEventObjectType->Security = NULL;
+ ExEventObjectType->QueryName = NULL;
+ ExEventObjectType->OkayToClose = NULL;
+ ExEventObjectType->Create = NtpCreateEvent;
+ ExEventObjectType->DuplicationNotify = NULL;
+
+ ObpCreateTypeObject(ExEventObjectType);
}
+
/*
* @implemented
*/
-NTSTATUS
-STDCALL
+NTSTATUS STDCALL
NtClearEvent(IN HANDLE EventHandle)
{
- PKEVENT Event;
- NTSTATUS Status;
-
- PAGED_CODE();
+ PKEVENT Event;
+ NTSTATUS Status;
- /* Reference the Object */
+ PAGED_CODE();
+
Status = ObReferenceObjectByHandle(EventHandle,
- EVENT_MODIFY_STATE,
- ExEventObjectType,
- ExGetPreviousMode(),
- (PVOID*)&Event,
- NULL);
+ EVENT_MODIFY_STATE,
+ ExEventObjectType,
+ ExGetPreviousMode(),
+ (PVOID*)&Event,
+ NULL);
+ if(NT_SUCCESS(Status))
+ {
+ KeClearEvent(Event);
+ ObDereferenceObject(Event);
+ }
- /* Check for Success */
- if(NT_SUCCESS(Status)) {
-
- /* Clear the Event and Dereference */
- KeClearEvent(Event);
- ObDereferenceObject(Event);
- }
-
- /* Return Status */
- return Status;
+ return Status;
}
/*
* @implemented
*/
-NTSTATUS
-STDCALL
+NTSTATUS STDCALL
NtCreateEvent(OUT PHANDLE EventHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
- IN EVENT_TYPE EventType,
- IN BOOLEAN InitialState)
+ IN ACCESS_MASK DesiredAccess,
+ IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
+ IN EVENT_TYPE EventType,
+ IN BOOLEAN InitialState)
{
- KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
- PKEVENT Event;
- HANDLE hEvent;
- NTSTATUS Status = STATUS_SUCCESS;
+ KPROCESSOR_MODE PreviousMode;
+ PKEVENT Event;
+ HANDLE hEvent;
+ NTSTATUS Status = STATUS_SUCCESS;
- PAGED_CODE();
+ PAGED_CODE();
- /* Check Output Safety */
- if(PreviousMode == UserMode) {
-
- _SEH_TRY {
-
- ProbeForWrite(EventHandle,
- sizeof(HANDLE),
- sizeof(ULONG));
- } _SEH_HANDLE {
-
- Status = _SEH_GetExceptionCode();
-
- } _SEH_END;
+ PreviousMode = ExGetPreviousMode();
+
+ if(PreviousMode == UserMode)
+ {
+ _SEH_TRY
+ {
+ ProbeForWrite(EventHandle,
+ sizeof(HANDLE),
+ sizeof(ULONG));
+ }
+ _SEH_HANDLE
+ {
+ Status = _SEH_GetExceptionCode();
+ }
+ _SEH_END;
- if(!NT_SUCCESS(Status)) return Status;
- }
-
- /* Create the Object */
- Status = ObCreateObject(PreviousMode,
- ExEventObjectType,
- ObjectAttributes,
- PreviousMode,
- NULL,
- sizeof(KEVENT),
- 0,
- 0,
- (PVOID*)&Event);
-
- /* Check for Success */
- if(NT_SUCCESS(Status)) {
-
- /* Initalize the Event */
- KeInitializeEvent(Event,
- EventType,
- InitialState);
-
- /* Insert it */
- Status = ObInsertObject((PVOID)Event,
- NULL,
- DesiredAccess,
- 0,
- NULL,
- &hEvent);
- ObDereferenceObject(Event);
+ if(!NT_SUCCESS(Status))
+ {
+ return Status;
+ }
+ }
- /* Check for success and return handle */
- if(NT_SUCCESS(Status)) {
-
- _SEH_TRY {
-
- *EventHandle = hEvent;
-
- } _SEH_HANDLE {
-
- Status = _SEH_GetExceptionCode();
-
- } _SEH_END;
- }
- }
-
- /* Return Status */
- return Status;
+ Status = ObCreateObject(PreviousMode,
+ ExEventObjectType,
+ ObjectAttributes,
+ PreviousMode,
+ NULL,
+ sizeof(KEVENT),
+ 0,
+ 0,
+ (PVOID*)&Event);
+ if(NT_SUCCESS(Status))
+ {
+ KeInitializeEvent(Event,
+ EventType,
+ InitialState);
+
+
+ Status = ObInsertObject((PVOID)Event,
+ NULL,
+ DesiredAccess,
+ 0,
+ NULL,
+ &hEvent);
+ ObDereferenceObject(Event);
+
+ if(NT_SUCCESS(Status))
+ {
+ _SEH_TRY
+ {
+ *EventHandle = hEvent;
+ }
+ _SEH_HANDLE
+ {
+ Status = _SEH_GetExceptionCode();
+ }
+ _SEH_END;
+ }
+ }
+
+ return Status;
}
+
/*
* @implemented
*/
-NTSTATUS
-STDCALL
+NTSTATUS STDCALL
NtOpenEvent(OUT PHANDLE EventHandle,
- IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes)
+ IN ACCESS_MASK DesiredAccess,
+ IN POBJECT_ATTRIBUTES ObjectAttributes)
{
- HANDLE hEvent;
- KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
- NTSTATUS Status = STATUS_SUCCESS;
+ HANDLE hEvent;
+ KPROCESSOR_MODE PreviousMode;
+ NTSTATUS Status = STATUS_SUCCESS;
- PAGED_CODE();
- DPRINT("NtOpenEvent(0x%x, 0x%x, 0x%x)\n", EventHandle,
DesiredAccess, ObjectAttributes);
+ PAGED_CODE();
+
+ DPRINT("NtOpenEvent(0x%x, 0x%x, 0x%x)\n", EventHandle,
DesiredAccess, ObjectAttributes);
- /* Check Output Safety */
- if(PreviousMode == UserMode) {
-
- _SEH_TRY {
-
- ProbeForWrite(EventHandle,
- sizeof(HANDLE),
- sizeof(ULONG));
- } _SEH_HANDLE {
-
- Status = _SEH_GetExceptionCode();
-
- } _SEH_END;
+ PreviousMode = ExGetPreviousMode();
+
+ if(PreviousMode == UserMode)
+ {
+ _SEH_TRY
+ {
+ ProbeForWrite(EventHandle,
+ sizeof(HANDLE),
+ sizeof(ULONG));
+ }
+ _SEH_HANDLE
+ {
+ Status = _SEH_GetExceptionCode();
+ }
+ _SEH_END;
- if(!NT_SUCCESS(Status)) return Status;
- }
-
- /* Open the Object */
- Status = ObOpenObjectByName(ObjectAttributes,
- ExEventObjectType,
- NULL,
- PreviousMode,
- DesiredAccess,
- NULL,
- &hEvent);
+ if(!NT_SUCCESS(Status))
+ {
+ return Status;
+ }
+ }
+
+ Status = ObOpenObjectByName(ObjectAttributes,
+ ExEventObjectType,
+ NULL,
+ PreviousMode,
+ DesiredAccess,
+ NULL,
+ &hEvent);
- /* Check for success and return handle */
- if(NT_SUCCESS(Status)) {
-
- _SEH_TRY {
-
- *EventHandle = hEvent;
-
- } _SEH_HANDLE {
-
- Status = _SEH_GetExceptionCode();
-
- } _SEH_END;
- }
+ if(NT_SUCCESS(Status))
+ {
+ _SEH_TRY
+ {
+ *EventHandle = hEvent;
+ }
+ _SEH_HANDLE
+ {
+ Status = _SEH_GetExceptionCode();
+ }
+ _SEH_END;
+ }
- /* Return status */
- return Status;
+ return Status;
}
+
/*
* @implemented
*/
-NTSTATUS
-STDCALL
+NTSTATUS STDCALL
NtPulseEvent(IN HANDLE EventHandle,
- OUT PLONG PreviousState OPTIONAL)
+ OUT PLONG PreviousState OPTIONAL)
{
- PKEVENT Event;
- KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
- NTSTATUS Status = STATUS_SUCCESS;
+ PKEVENT Event;
+ KPROCESSOR_MODE PreviousMode;
+ NTSTATUS Status = STATUS_SUCCESS;
- PAGED_CODE();
- DPRINT("NtPulseEvent(EventHandle 0%x PreviousState 0%x)\n",
- EventHandle, PreviousState);
+ PAGED_CODE();
- /* Check buffer validity */
- if(PreviousState && PreviousMode == UserMode) {
-
- _SEH_TRY {
-
- ProbeForWrite(PreviousState,
- sizeof(LONG),
- sizeof(ULONG));
- } _SEH_HANDLE {
-
- Status = _SEH_GetExceptionCode();
-
- } _SEH_END;
+ DPRINT("NtPulseEvent(EventHandle 0%x PreviousState 0%x)\n",
+ EventHandle, PreviousState);
- if(!NT_SUCCESS(Status)) return Status;
- }
-
- /* Open the Object */
- Status = ObReferenceObjectByHandle(EventHandle,
- EVENT_MODIFY_STATE,
- ExEventObjectType,
- PreviousMode,
- (PVOID*)&Event,
- NULL);
-
- /* Check for success */
- if(NT_SUCCESS(Status)) {
-
- /* Pulse the Event */
- LONG Prev = KePulseEvent(Event, EVENT_INCREMENT, FALSE);
- ObDereferenceObject(Event);
+ PreviousMode = ExGetPreviousMode();
+
+ if(PreviousState != NULL && PreviousMode == UserMode)
+ {
+ _SEH_TRY
+ {
+ ProbeForWrite(PreviousState,
+ sizeof(LONG),
+ sizeof(ULONG));
+ }
+ _SEH_HANDLE
+ {
+ Status = _SEH_GetExceptionCode();
+ }
+ _SEH_END;
- /* Return it */
- if(PreviousState) {
-
- _SEH_TRY {
-
- *PreviousState = Prev;
-
- } _SEH_HANDLE {
-
- Status = _SEH_GetExceptionCode();
-
- } _SEH_END;
- }
+ if(!NT_SUCCESS(Status))
+ {
+ return Status;
+ }
}
- /* Return Status */
+ Status = ObReferenceObjectByHandle(EventHandle,
+ EVENT_MODIFY_STATE,
+ ExEventObjectType,
+ PreviousMode,
+ (PVOID*)&Event,
+ NULL);
+ if(NT_SUCCESS(Status))
+ {
+ LONG Prev = KePulseEvent(Event, EVENT_INCREMENT, FALSE);
+ ObDereferenceObject(Event);
+
+ if(PreviousState != NULL)
+ {
+ _SEH_TRY
+ {
+ *PreviousState = Prev;
+ }
+ _SEH_HANDLE
+ {
+ Status = _SEH_GetExceptionCode();
+ }
+ _SEH_END;
+ }
+ }
+
return Status;
}
@@ -306,202 +320,230 @@
/*
* @implemented
*/
-NTSTATUS
-STDCALL
+NTSTATUS STDCALL
NtQueryEvent(IN HANDLE EventHandle,
- IN EVENT_INFORMATION_CLASS EventInformationClass,
[truncated at 1000 lines; 13561 more skipped]
[Attachment #3 (text/html)]
<html>
<head>
<style>
<!--
body { background-color:#ffffff }
.file { border:1px solid #eeeeee; margin-top:1em; margin-bottom:1em }
.pathname { font-family:monospace; float:right }
.fileheader { margin-bottom:.5em }
.diff { margin:0 }
.tasklist { padding:4px; border:1px dashed #000000; margin-top:1em }
.tasklist ul { margin-top:0; margin-bottom:0 }
tr.alt { background-color:#eeeeee }
#added { background-color:#ddffdd }
#addedchars { background-color:#99ff99; font-weight:bolder }
tr.alt #added { background-color:#ccf7cc }
#removed { background-color:#ffdddd }
#removedchars { background-color:#ff9999; font-weight:bolder }
tr.alt #removed { background-color:#f7cccc }
#info { color:#888888 }
#context { background-color:#eeeeee }
td {padding-left:.3em; padding-right:.3em }
tr.head { border-bottom-width:1px; border-bottom-style:solid }
tr.head td { padding:0; padding-top:.2em }
.task { background-color:#ffff00 }
.comment { padding:4px; border:1px dashed #000000; background-color:#ffffdd }
.error { color:red }
hr { border-width:0px; height:2px; background:black }
-->
</style>
</head>
<body>
<pre class="comment">Reverting to 13775. Sorry for the mess. This is dedicated to \
Jane! 19934415.</pre><pre class="diff" id="context">Modified: \
trunk/reactos/config
Modified: trunk/reactos/drivers/storage/floppy/floppy.c
Modified: trunk/reactos/include/ddk/extypes.h
Modified: trunk/reactos/include/ddk/iotypes.h
Modified: trunk/reactos/include/ddk/ketypes.h
Modified: trunk/reactos/include/ntos/zwtypes.h
Modified: trunk/reactos/lib/ntdll/def/ntdll.def
Modified: trunk/reactos/ntoskrnl/Makefile
Modified: trunk/reactos/ntoskrnl/cm/registry.c
</pre><pre class="diff" id="removed">Deleted: trunk/reactos/ntoskrnl/ex/error.c
</pre><pre class="diff" id="context">Modified: trunk/reactos/ntoskrnl/ex/event.c
Modified: trunk/reactos/ntoskrnl/ex/evtpair.c
Modified: trunk/reactos/ntoskrnl/ex/init.c
Modified: trunk/reactos/ntoskrnl/ex/mutant.c
Modified: trunk/reactos/ntoskrnl/ex/rundown.c
Modified: trunk/reactos/ntoskrnl/ex/sem.c
Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c
Modified: trunk/reactos/ntoskrnl/ex/timer.c
Modified: trunk/reactos/ntoskrnl/ex/work.c
Modified: trunk/reactos/ntoskrnl/include/internal/ex.h
Modified: trunk/reactos/ntoskrnl/include/internal/id.h
Modified: trunk/reactos/ntoskrnl/include/internal/io.h
Modified: trunk/reactos/ntoskrnl/include/internal/ke.h
Modified: trunk/reactos/ntoskrnl/include/internal/nls.h
Modified: trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h
Modified: trunk/reactos/ntoskrnl/include/internal/ps.h
Modified: trunk/reactos/ntoskrnl/io/bootlog.c
Modified: trunk/reactos/ntoskrnl/io/create.c
Modified: trunk/reactos/ntoskrnl/io/driver.c
Modified: trunk/reactos/ntoskrnl/io/iocomp.c
Modified: trunk/reactos/ntoskrnl/io/iomgr.c
Modified: trunk/reactos/ntoskrnl/io/wmi.c
</pre><pre class="diff" id="added">Added: trunk/reactos/ntoskrnl/ke/alert.c
</pre><pre class="diff" id="context">Modified: trunk/reactos/ntoskrnl/ke/apc.c
Modified: trunk/reactos/ntoskrnl/ke/bug.c
Modified: trunk/reactos/ntoskrnl/ke/catch.c
</pre><pre class="diff" id="added">Added: trunk/reactos/ntoskrnl/ke/critical.c
</pre><pre class="diff" id="context">Modified: trunk/reactos/ntoskrnl/ke/dpc.c
</pre><pre class="diff" id="added">Added: trunk/reactos/ntoskrnl/ke/error.c
</pre><pre class="diff" id="context">Modified: trunk/reactos/ntoskrnl/ke/event.c
Modified: trunk/reactos/ntoskrnl/ke/i386/tskswitch.S
Modified: trunk/reactos/ntoskrnl/ke/kthread.c
Modified: trunk/reactos/ntoskrnl/ke/main.c
Modified: trunk/reactos/ntoskrnl/ke/mutex.c
Modified: trunk/reactos/ntoskrnl/ke/queue.c
Modified: trunk/reactos/ntoskrnl/ke/sem.c
Modified: trunk/reactos/ntoskrnl/ke/timer.c
Modified: trunk/reactos/ntoskrnl/ke/wait.c
Modified: trunk/reactos/ntoskrnl/ntoskrnl.def
Modified: trunk/reactos/ntoskrnl/ntoskrnl.mc
</pre><pre class="diff" id="removed">Deleted: trunk/reactos/ntoskrnl/ob/wait.c
</pre><pre class="diff" id="context">Modified: trunk/reactos/ntoskrnl/ps/kill.c
Modified: trunk/reactos/ntoskrnl/ps/process.c
Modified: trunk/reactos/ntoskrnl/ps/thread.c
Modified: trunk/reactos/ntoskrnl/rtl/nls.c
Modified: trunk/reactos/tools/nci/sysfuncs.lst
</pre><hr /><div class="file">
<div class="fileheader"><big><b>Modified: trunk/reactos/config</b></big></div>
<pre class="diff"><small id="info">--- trunk/reactos/config 2005-02-28 16:44:38 UTC \
(rev 13776)
+++ trunk/reactos/config 2005-02-28 17:40:15 UTC (rev 13777)
@@ -15,7 +15,7 @@
</small></pre><pre class="diff" id="context"> # be optimze for.
#
</pre><pre class="diff" id="removed">-OARCH := <span \
id="removedchars">pentium2</span> </pre><pre class="diff" id="added">+OARCH := <span \
id="addedchars">i486</span> </pre><pre class="diff" id="context">
#
# Whether to compile in the kernel debugger
@@ -30,7 +30,7 @@
</pre><pre class="diff" id="context"> #
# Whether to compile with optimizations
#
</pre><pre class="diff" id="removed">-OPTIMIZED := <span id="removedchars">1</span>
</pre><pre class="diff" id="added">+OPTIMIZED := <span id="addedchars">0</span>
</pre><pre class="diff" id="context">
#
# Whether to compile a multiprocessor or single processor version
</pre></div>
<hr /><div class="file">
<div class="fileheader"><big><b>Modified: \
trunk/reactos/drivers/storage/floppy/floppy.c</b></big></div> <pre \
class="diff"><small id="info">--- \
trunk/reactos/drivers/storage/floppy/floppy.c 2005-02-28 16:44:38 UTC \
(rev 13776)
+++ trunk/reactos/drivers/storage/floppy/floppy.c 2005-02-28 17:40:15 UTC (rev 13777)
@@ -58,7 +58,7 @@
</small></pre><pre class="diff" id="context">
/* Queue thread management */
static KEVENT QueueThreadTerminate;
</pre><pre class="diff" id="removed">-static PVOID <span \
id="removedchars">Queue</span>ThreadObject; </pre><pre class="diff" \
id="added">+static PVOID ThreadObject; </pre><pre class="diff" id="context">
static VOID NTAPI MotorStopDpcFunc(PKDPC UnusedDpc,
@@ -378,8 +378,8 @@
</pre><pre class="diff" id="context"> KdPrint(("floppy: \
unloading\n"));
KeSetEvent(&QueueThreadTerminate, 0, FALSE);
</pre><pre class="diff" id="removed">- KeWaitForSingleObject(QueueThreadObject, \
Executive, KernelMode, FALSE, 0);
- <span id="removedchars">ObDereferenceObject(QueueThreadObject</span>);
</pre><pre class="diff" id="added">+ <span \
id="addedchars">KeWaitForSingleObject(ThreadObject, Executive, KernelMode, FALSE, \
0</span>); + ObDereferenceObject(ThreadObject);
</pre><pre class="diff" id="context">
for(i = 0; i < gNumberOfControllers; i++)
{
@@ -1152,7 +1152,7 @@
</pre><pre class="diff" id="context"> return \
STATUS_INSUFFICIENT_RESOURCES; }
</pre><pre class="diff" id="removed">- \
if(ObReferenceObjectByHandle(ThreadHandle, STANDARD_RIGHTS_ALL, NULL, \
KernelMode, &<span id="removedchars">Queue</span>ThreadObject, NULL) != \
STATUS_SUCCESS) </pre><pre class="diff" id="added">+ \
if(ObReferenceObjectByHandle(ThreadHandle, STANDARD_RIGHTS_ALL, NULL, \
KernelMode, &ThreadObject, NULL) != STATUS_SUCCESS) </pre><pre class="diff" \
id="context"> { KdPrint(("floppy: Unable to \
reference returned thread handle; failing init\n")); \
return STATUS_UNSUCCESSFUL; </pre></div>
<hr /><div class="file">
<div class="fileheader"><big><b>Modified: \
trunk/reactos/include/ddk/extypes.h</b></big></div> <pre class="diff"><small \
id="info">--- trunk/reactos/include/ddk/extypes.h 2005-02-28 16:44:38 \
UTC (rev 13776)
+++ trunk/reactos/include/ddk/extypes.h 2005-02-28 17:40:15 UTC (rev 13777)
@@ -30,23 +30,6 @@
</small></pre><pre class="diff" id="context"> MaximumWorkQueue
} WORK_QUEUE_TYPE;
</pre><pre class="diff" id="removed">-typedef struct _EX_QUEUE_WORKER_INFO {
- UCHAR QueueDisabled:1;
- UCHAR MakeThreadsAsNecessary:1;
- UCHAR WaitMode:1;
- ULONG WorkerCount:29;
-} EX_QUEUE_WORKER_INFO, *PEX_QUEUE_WORKER_INFO;
-
-typedef struct _EX_WORK_QUEUE {
- KQUEUE WorkerQueue;
- ULONG DynamicThreadCount;
- ULONG WorkItemsProcessed;
- ULONG WorkItemsProcessedLastPass;
- ULONG QueueDepthLastPass;
- EX_QUEUE_WORKER_INFO Info;
-} EX_WORK_QUEUE, *PEX_WORK_QUEUE;
-
-
</pre><pre class="diff" id="context"> typedef ULONG_PTR ERESOURCE_THREAD, \
*PERESOURCE_THREAD;
typedef struct _OWNER_ENTRY
@@ -257,10 +240,6 @@
</pre><pre class="diff" id="context"> PVOID Argument1,
PVOID Argument2);
</pre><pre class="diff" id="removed">-extern struct _OBJECT_TYPE EXPORTED \
*ExMutantObjectType;
-extern struct _OBJECT_TYPE EXPORTED *ExSemaphoreObjectType;
-extern struct _OBJECT_TYPE EXPORTED *ExTimerType;
-
</pre><pre class="diff" id="context"> #endif /* __INCLUDE_DDK_EXTYPES_H */
/* EOF */
</pre></div>
<hr /><div class="file">
<div class="fileheader"><big><b>Modified: \
trunk/reactos/include/ddk/iotypes.h</b></big></div> <pre class="diff"><small \
id="info">--- trunk/reactos/include/ddk/iotypes.h 2005-02-28 16:44:38 \
UTC (rev 13776)
+++ trunk/reactos/include/ddk/iotypes.h 2005-02-28 17:40:15 UTC (rev 13777)
@@ -886,8 +886,6 @@
</small></pre><pre class="diff" id="context"> #endif
#define IO_TYPE_DRIVER 4L
</pre><pre class="diff" id="removed">-#define IO_TYPE_FILE 0x0F5L
-
</pre><pre class="diff" id="context"> #define DRVO_UNLOAD_INVOKED 0x1L
#define DRVO_LEGACY_DRIVER 0x2L
#define DRVO_BUILTIN_DRIVER 0x4L
</pre></div>
<hr /><div class="file">
<div class="fileheader"><big><b>Modified: \
trunk/reactos/include/ddk/ketypes.h</b></big></div> <pre class="diff"><small \
id="info">--- trunk/reactos/include/ddk/ketypes.h 2005-02-28 16:44:38 \
UTC (rev 13776)
+++ trunk/reactos/include/ddk/ketypes.h 2005-02-28 17:40:15 UTC (rev 13777)
@@ -36,34 +36,23 @@
</small></pre><pre class="diff" id="context">
struct _DISPATCHER_HEADER;
</pre><pre class="diff" id="removed">-typedef enum _KOBJECTS {
- EventNotificationObject = 0,
- EventSynchronizationObject = 1,
- MutantObject = 2,
- ProcessObject = 3,
- QueueObject = 4,
- SemaphoreObject = 5,
- ThreadObject = 6,
- GateObject = 7,
- TimerNotificationObject = 8,
- TimerSynchronizationObject = 9,
- Spare2Object = 10,
- Spare3Object = 11,
- Spare4Object = 12,
- Spare5Object = 13,
- Spare6Object = 14,
- Spare7Object = 15,
- Spare8Object = 16,
- Spare9Object = 17,
- ApcObject = 18,
- DpcObject = 19,
- DeviceQueueObject = 20,
- EventPairObject = 21,
- InterruptObject = 22,
- ProfileObject = 23,
- ThreadedDpcObject = 24,
- MaximumKernelObject = 25
-} KOBJECTS;
</pre><pre class="diff" id="added">+typedef enum _KERNEL_OBJECTS {
+ KNotificationEvent = 0,
+ KSynchronizationEvent = 1,
+ KMutant = 2,
+ KProcess = 3,
+ KQueue = 4,
+ KSemaphore = 5,
+ KThread = 6,
+ KNotificationTimer = 8,
+ KSynchronizationTimer = 9,
+ KApc = 18,
+ KDpc = 19,
+ KDeviceQueue = 20,
+ KEventPair = 21,
+ KInterrupt = 22,
+ KProfile = 23
+} KERNEL_OBJECTS;
</pre><pre class="diff" id="context">
#include <pshpack1.h>
</pre></div>
<hr /><div class="file">
<div class="fileheader"><big><b>Modified: \
trunk/reactos/include/ntos/zwtypes.h</b></big></div> <pre class="diff"><small \
id="info">--- trunk/reactos/include/ntos/zwtypes.h 2005-02-28 16:44:38 UTC (rev \
13776)
+++ trunk/reactos/include/ntos/zwtypes.h 2005-02-28 17:40:15 UTC (rev 13777)
@@ -1262,9 +1262,9 @@
</small></pre><pre class="diff" id="context">
typedef struct _MUTANT_BASIC_INFORMATION
{
</pre><pre class="diff" id="removed">- LONG CurrentCount;
- BOOLEAN OwnedByCaller;
- <span id="removedchars">BOOLEAN AbandonedState</span>;
</pre><pre class="diff" id="added">+ <span id="addedchars">LONG Count</span>;
+ BOOLEAN Owned;
+ BOOLEAN Abandoned;
</pre><pre class="diff" id="context"> } MUTANT_BASIC_INFORMATION, \
*PMUTANT_BASIC_INFORMATION;
</pre></div>
<hr /><div class="file">
<div class="fileheader"><big><b>Modified: \
trunk/reactos/lib/ntdll/def/ntdll.def</b></big></div> <pre class="diff"><small \
id="info">--- trunk/reactos/lib/ntdll/def/ntdll.def 2005-02-28 16:44:38 UTC (rev \
13776)
+++ trunk/reactos/lib/ntdll/def/ntdll.def 2005-02-28 17:40:15 UTC (rev 13777)
@@ -225,6 +225,7 @@
</small></pre><pre class="diff" id="context"> NtSetEvent@8
NtSetHighEventPair@4
NtSetHighWaitLowEventPair@4
</pre><pre class="diff" id="added">+NtSetHighWaitLowThread@0
</pre><pre class="diff" id="context"> NtSetInformationFile@20
NtSetInformationJobObject@16
NtSetInformationKey@16
@@ -237,6 +238,7 @@
</pre><pre class="diff" id="context"> NtSetLdtEntries@24
NtSetLowEventPair@4
NtSetLowWaitHighEventPair@4
</pre><pre class="diff" id="added">+NtSetLowWaitHighThread@0
</pre><pre class="diff" id="context"> NtSetSecurityObject@12
NtSetSystemEnvironmentValue@8
NtSetSystemInformation@12
@@ -847,6 +849,7 @@
</pre><pre class="diff" id="context"> ZwSetEvent@8
ZwSetHighEventPair@4
ZwSetHighWaitLowEventPair@4
</pre><pre class="diff" id="added">+ZwSetHighWaitLowThread@0
</pre><pre class="diff" id="context"> ZwSetInformationFile@20
ZwSetInformationKey@16
ZwSetInformationObject@16
@@ -858,6 +861,7 @@
</pre><pre class="diff" id="context"> ZwSetLdtEntries@24
ZwSetLowEventPair@4
ZwSetLowWaitHighEventPair@4
</pre><pre class="diff" id="added">+ZwSetLowWaitHighThread@0
</pre><pre class="diff" id="context"> ZwSetSecurityObject@12
ZwSetSystemEnvironmentValue@8
ZwSetSystemInformation@12
</pre></div>
<hr /><div class="file">
<div class="fileheader"><big><b>Modified: \
trunk/reactos/ntoskrnl/Makefile</b></big></div> <pre class="diff"><small \
id="info">--- trunk/reactos/ntoskrnl/Makefile 2005-02-28 16:44:38 UTC \
(rev 13776)
+++ trunk/reactos/ntoskrnl/Makefile 2005-02-28 17:40:15 UTC (rev 13777)
@@ -101,8 +101,10 @@
</small></pre><pre class="diff" id="context"> ke/bug.o \
ke/catch.o \
ke/clock.o \
</pre><pre class="diff" id="added">+ ke/critical.o \
</pre><pre class="diff" id="context"> ke/dpc.o \
ke/device.o \
</pre><pre class="diff" id="added">+ ke/error.o \
</pre><pre class="diff" id="context"> ke/event.o \
ke/kqueue.o \
ke/kthread.o \
@@ -116,6 +118,7 @@
</pre><pre class="diff" id="context"> ke/spinlock.o \
ke/timer.o \
ke/wait.o \
</pre><pre class="diff" id="added">+ ke/alert.o
</pre><pre class="diff" id="context">
# Memory Manager (Mm)
OBJECTS_MM = \
@@ -216,8 +219,7 @@
</pre><pre class="diff" id="context"> ob/object.o \
ob/sdcache.o \
ob/security.o \
</pre><pre class="diff" id="removed">- ob/symlink.o \
- ob/<span id="removedchars">wait</span>.o
</pre><pre class="diff" id="added">+ ob/<span id="addedchars">symlink</span>.o
</pre><pre class="diff" id="context">
# Process Manager (Ps)
OBJECTS_PS = \
@@ -240,7 +242,6 @@
</pre><pre class="diff" id="context"> OBJECTS_EX = \
ex/btree.o \
ex/callback.o \
</pre><pre class="diff" id="removed">- ex/error.o \
</pre><pre class="diff" id="context"> ex/event.o \
ex/evtpair.o \
ex/fmutex.o \
</pre></div>
<hr /><div class="file">
<div class="fileheader"><big><b>Modified: \
trunk/reactos/ntoskrnl/cm/registry.c</b></big></div> <pre class="diff"><small \
id="info">--- trunk/reactos/ntoskrnl/cm/registry.c 2005-02-28 16:44:38 UTC (rev \
13776)
+++ trunk/reactos/ntoskrnl/cm/registry.c 2005-02-28 17:40:15 UTC (rev 13777)
@@ -241,30 +241,7 @@
</small></pre><pre class="diff" id="context"> CmiCheckByName(Verbose, \
L"User"); }
</pre><pre class="diff" id="removed">-VOID
-INIT_FUNCTION
-STDCALL
-CmInitHives(BOOLEAN SetupBoot)
-{
- PCHAR BaseAddress;
-
- /* Load Registry Hives */
- BaseAddress = (PCHAR)CachedModules[SystemRegistry]->ModStart;
- CmImportSystemHive(BaseAddress,
- \
CachedModules[SystemRegistry]->ModEnd - (ULONG_PTR)BaseAddress);
-
- BaseAddress = (PCHAR)CachedModules[HardwareRegistry]->ModStart;
- CmImportHardwareHive(BaseAddress,
- \
CachedModules[HardwareRegistry]->ModEnd - (ULONG_PTR)BaseAddress);
-
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- /* Create dummy keys if no \
hardware hive was found */
- CmImportHardwareHive (NULL, 0);
-
- /* Initialize volatile registry settings */
- if (SetupBoot == FALSE) CmInit2((PCHAR)KeLoaderBlock.CommandLine);
-}
-
</pre><pre class="diff" id="context"> VOID INIT_FUNCTION
CmInitializeRegistry(VOID)
{
</pre></div>
<hr /><div class="file">
<div class="fileheader"><big><b>Deleted: \
trunk/reactos/ntoskrnl/ex/error.c</b></big></div> <pre class="diff"><small \
id="info">--- trunk/reactos/ntoskrnl/ex/error.c 2005-02-28 16:44:38 \
UTC (rev 13776)
+++ trunk/reactos/ntoskrnl/ex/error.c 2005-02-28 17:40:15 UTC (rev 13777)
@@ -1,163 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
- * FILE: ntoskrnl/ex/error.c
- * PURPOSE: Error Functions and Status/Exception \
Dispatching/Raising
- *
- * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) - Created File
- */
-
-/* INCLUDES *****************************************************************/
-
-#include <ntoskrnl.h>
-#define NDEBUG
-#include <internal/debug.h>
-
-/* GLOBALS ****************************************************************/
-
-BOOLEAN ExReadyForErrors = FALSE;
-PEPORT ExpDefaultErrorPort = NULL;
-PEPROCESS ExpDefaultErrorPortProcess = NULL;
-
-/* FUNCTIONS ****************************************************************/
-
-/*
- * @implemented
- */
-VOID
-STDCALL
-ExRaiseAccessViolation(VOID)
-{
- /* Raise the Right Status */
- ExRaiseStatus (STATUS_ACCESS_VIOLATION);
-}
-
-/*
- * @implemented
- */
-VOID
-STDCALL
-ExRaiseDatatypeMisalignment (VOID)
-{
- /* Raise the Right Status */
- ExRaiseStatus (STATUS_DATATYPE_MISALIGNMENT);
-}
-
-/*
- * @implemented
- */
-VOID
-STDCALL
-ExRaiseStatus(IN NTSTATUS Status)
-{
- EXCEPTION_RECORD ExceptionRecord;
-
- DPRINT("ExRaiseStatus(%x)\n", Status);
-
- /* Set up an Exception Record */
- ExceptionRecord.ExceptionRecord = NULL;
- ExceptionRecord.NumberParameters = 0;
- ExceptionRecord.ExceptionCode = Status;
- ExceptionRecord.ExceptionFlags = 0;
-
- /* Call the Rtl Function */
- RtlRaiseException(&ExceptionRecord);
-}
-
-/*
- * @implemented
- */
-VOID
-STDCALL
-ExRaiseException (PEXCEPTION_RECORD ExceptionRecord)
-{
- /* Call the Rtl function */
- RtlRaiseException(ExceptionRecord);
-}
-
-/*
- * @implemented
- */
-BOOLEAN
-STDCALL
-ExSystemExceptionFilter(VOID)
-{
- return KeGetPreviousMode() != KernelMode ? EXCEPTION_EXECUTE_HANDLER : \
EXCEPTION_CONTINUE_SEARCH;
-}
-
-/*
- * @unimplemented
- */
-VOID
-STDCALL
-ExRaiseHardError(IN NTSTATUS ErrorStatus,
- IN ULONG \
NumberOfParameters,
- IN PUNICODE_STRING \
UnicodeStringParameterMask OPTIONAL,
- IN PVOID *Parameters,
- IN \
HARDERROR_RESPONSE_OPTION ResponseOption,
- OUT PHARDERROR_RESPONSE \
Response)
-{
- UNIMPLEMENTED;
-}
-
-NTSTATUS
-STDCALL
-NtRaiseHardError(IN NTSTATUS ErrorStatus,
- IN ULONG \
NumberOfParameters,
- IN PUNICODE_STRING \
UnicodeStringParameterMask OPTIONAL,
- IN PVOID *Parameters,
- IN \
HARDERROR_RESPONSE_OPTION ResponseOption,
- OUT PHARDERROR_RESPONSE \
Response)
-{
- DPRINT1("Hard error %x\n", ErrorStatus);
-
- /* Call the Executive Function (WE SHOULD PUT SEH HERE/CAPTURE!) */
- ExRaiseHardError(ErrorStatus,
- \
NumberOfParameters,
- \
UnicodeStringParameterMask,
- Parameters,
- \
ResponseOption,
- Response);
-
- /* Return Success */
- return STATUS_SUCCESS;
-}
-
-NTSTATUS
-STDCALL
-NtSetDefaultHardErrorPort(IN HANDLE PortHandle)
-{
-
- KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
- NTSTATUS Status = STATUS_UNSUCCESSFUL;
-
- /* Check if we have the Privilege */
- if(!SeSinglePrivilegeCheck(SeTcbPrivilege, PreviousMode)) {
-
- DPRINT1("NtSetDefaultHardErrorPort: Caller requires \
the SeTcbPrivilege privilege!\n");
- return STATUS_PRIVILEGE_NOT_HELD;
- }
-
- /* Only called once during bootup, make sure we weren't called yet */
- if(!ExReadyForErrors) {
-
- Status = ObReferenceObjectByHandle(PortHandle,
- \
0,
- \
\
LpcPortObjectType,
- \
\
PreviousMode,
- \
\
(PVOID*)&ExpDefaultErrorPort,
- \
NULL);
-
- /* Check for Success */
- if(NT_SUCCESS(Status)) {
-
- /* Save the data */
- ExpDefaultErrorPortProcess = \
PsGetCurrentProcess();
- ExReadyForErrors = TRUE;
- }
- }
-
- return Status;
-}
-
-/* EOF */
</pre></div>
<hr /><div class="file">
<div class="fileheader"><big><b>Modified: \
trunk/reactos/ntoskrnl/ex/event.c</b></big></div> <pre class="diff"><small \
id="info">--- trunk/reactos/ntoskrnl/ex/event.c 2005-02-28 16:44:38 \
UTC (rev 13776)
+++ trunk/reactos/ntoskrnl/ex/event.c 2005-02-28 17:40:15 UTC (rev 13777)
@@ -19,286 +19,300 @@
</small></pre><pre class="diff" id="context"> POBJECT_TYPE EXPORTED ExEventObjectType \
= NULL;
static GENERIC_MAPPING ExpEventMapping = {
</pre><pre class="diff" id="removed">- STANDARD_RIGHTS_READ | \
SYNCHRONIZE | EVENT_QUERY_STATE,
- STANDARD_RIGHTS_WRITE | SYNCHRONIZE | EVENT_MODIFY_STATE,
- STANDARD_RIGHTS_EXECUTE | SYNCHRONIZE | EVENT_QUERY_STATE,
- EVENT_ALL_ACCESS};
</pre><pre class="diff" id="added">+ STANDARD_RIGHTS_READ | SYNCHRONIZE | \
EVENT_QUERY_STATE, + STANDARD_RIGHTS_WRITE | SYNCHRONIZE | EVENT_MODIFY_STATE,
+ STANDARD_RIGHTS_EXECUTE | SYNCHRONIZE | EVENT_QUERY_STATE,
+ EVENT_ALL_ACCESS};
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">-static const INFORMATION_CLASS_INFO \
ExEventInfoClass[] = {
-
- /* EventBasicInformation */
- ICI_SQ_SAME( sizeof(EVENT_BASIC_INFORMATION), sizeof(ULONG), \
ICIF_QUERY), </pre><pre class="diff" id="added">+static const INFORMATION_CLASS_INFO \
ExEventInfoClass[] = +{
+ ICI_SQ_SAME( sizeof(EVENT_BASIC_INFORMATION), sizeof(ULONG), ICIF_QUERY ), /* \
EventBasicInformation */ </pre><pre class="diff" id="context"> };
/* FUNCTIONS *****************************************************************/
</pre><pre class="diff" id="removed">-VOID
-INIT_FUNCTION
</pre><pre class="diff" id="added">+NTSTATUS STDCALL
+NtpCreateEvent(PVOID ObjectBody,
+ PVOID Parent,
+ PWSTR RemainingPath,
+ POBJECT_ATTRIBUTES ObjectAttributes)
+{
+ DPRINT("NtpCreateEvent(ObjectBody %x, Parent %x, RemainingPath \
%S)\n", + ObjectBody, Parent, RemainingPath);
+
+ if (RemainingPath != NULL && wcschr(RemainingPath+1, '\\') != NULL)
+ {
+ return(STATUS_UNSUCCESSFUL);
+ }
+
+ return(STATUS_SUCCESS);
+}
+
+
+VOID INIT_FUNCTION
</pre><pre class="diff" id="context"> ExpInitializeEventImplementation(VOID)
{
</pre><pre class="diff" id="removed">- /* Create the Event Object Type \
*/
- ExEventObjectType = ExAllocatePool(NonPagedPool,sizeof(OBJECT_TYPE));
- RtlpCreateUnicodeString(&ExEventObjectType->TypeName, \
L"Event", NonPagedPool);
- ExEventObjectType->Tag = TAG('E', 'V', 'T', 'T');
- ExEventObjectType->PeakObjects = 0;
- ExEventObjectType->PeakHandles = 0;
- ExEventObjectType->TotalObjects = 0;
- ExEventObjectType->TotalHandles = 0;
- ExEventObjectType->PagedPoolCharge = 0;
- ExEventObjectType->NonpagedPoolCharge = sizeof(KEVENT);
- ExEventObjectType->Mapping = &ExpEventMapping;
- ExEventObjectType->Dump = NULL;
- ExEventObjectType->Open = NULL;
- ExEventObjectType->Close = NULL;
- ExEventObjectType->Delete = NULL;
- ExEventObjectType->Parse = NULL;
- ExEventObjectType->Security = NULL;
- ExEventObjectType->QueryName = NULL;
- ExEventObjectType->OkayToClose = NULL;
- ExEventObjectType->Create = NULL;
- ExEventObjectType->DuplicationNotify = NULL;
- <span id="removedchars"> ObpCreateTypeObject(ExEventObjectType</span>);
</pre><pre class="diff" id="added">+ <span id="addedchars">ExEventObjectType = \
ExAllocatePool(NonPagedPool,sizeof(OBJECT_TYPE)</span>); +
+ RtlpCreateUnicodeString(&ExEventObjectType->TypeName, \
L"Event", NonPagedPool); +
+ ExEventObjectType->Tag = TAG('E', 'V', 'T', 'T');
+ ExEventObjectType->PeakObjects = 0;
+ ExEventObjectType->PeakHandles = 0;
+ ExEventObjectType->TotalObjects = 0;
+ ExEventObjectType->TotalHandles = 0;
+ ExEventObjectType->PagedPoolCharge = 0;
+ ExEventObjectType->NonpagedPoolCharge = sizeof(KEVENT);
+ ExEventObjectType->Mapping = &ExpEventMapping;
+ ExEventObjectType->Dump = NULL;
+ ExEventObjectType->Open = NULL;
+ ExEventObjectType->Close = NULL;
+ ExEventObjectType->Delete = NULL;
+ ExEventObjectType->Parse = NULL;
+ ExEventObjectType->Security = NULL;
+ ExEventObjectType->QueryName = NULL;
+ ExEventObjectType->OkayToClose = NULL;
+ ExEventObjectType->Create = NtpCreateEvent;
+ ExEventObjectType->DuplicationNotify = NULL;
+
+ ObpCreateTypeObject(ExEventObjectType);
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> /*
* @implemented
*/
</pre><pre class="diff" id="removed">-NTSTATUS
-<span id="removedchars">S</span>TDCALL
</pre><pre class="diff" id="added">+<span id="addedchars">NTSTATUS S</span>TDCALL
</pre><pre class="diff" id="context"> NtClearEvent(IN HANDLE EventHandle)
{
</pre><pre class="diff" id="removed">- PKEVENT Event;
- NTSTATUS Status;
-
- <span id="removedchars"> PAGED_CODE()</span>;
</pre><pre class="diff" id="added">+ <span id="addedchars">PKEVENT \
Event</span>; + NTSTATUS Status;
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- <span id="removedchars"> /* Reference \
the Object */</span> </pre><pre class="diff" id="added">+ <span \
id="addedchars">PAGED_CODE();</span> +
</pre><pre class="diff" id="context"> Status = \
ObReferenceObjectByHandle(EventHandle, </pre><pre class="diff" id="removed">- \
\
EVENT_MODIFY_STATE,
- \
ExEventObjectType,
- \
ExGetPreviousMode(),
- \
(PVOID*)&Event,
- \
NULL); </pre><pre class="diff" \
id="added">+ EVENT_MODIFY_STATE, + \
ExEventObjectType, + ExGetPreviousMode(),
+ (PVOID*)&Event,
+ NULL);
+ if(NT_SUCCESS(Status))
+ {
+ KeClearEvent(Event);
+ ObDereferenceObject(Event);
+ }
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- /* Check for Success */
- if(NT_SUCCESS(Status)) {
-
- /* Clear the Event and Dereference */
- KeClearEvent(Event);
- ObDereferenceObject(Event);
- }
-
- /* Return Status */
- <span id="removedchars"> </span>return Status;
</pre><pre class="diff" id="added">+ return Status;
</pre><pre class="diff" id="context"> }
/*
* @implemented
*/
</pre><pre class="diff" id="removed">-NTSTATUS
-<span id="removedchars">S</span>TDCALL
</pre><pre class="diff" id="added">+<span id="addedchars">NTSTATUS S</span>TDCALL
</pre><pre class="diff" id="context"> NtCreateEvent(OUT PHANDLE EventHandle,
</pre><pre class="diff" id="removed">- \
IN ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES \
ObjectAttributes OPTIONAL,
- IN EVENT_TYPE EventType,
- IN BOOLEAN InitialState)
</pre><pre class="diff" id="added">+ IN ACCESS_MASK \
DesiredAccess, + IN POBJECT_ATTRIBUTES ObjectAttributes \
OPTIONAL, + IN EVENT_TYPE EventType,
+ IN BOOLEAN InitialState)
</pre><pre class="diff" id="context"> {
</pre><pre class="diff" id="removed">- KPROCESSOR_MODE PreviousMode = \
ExGetPreviousMode();
- PKEVENT Event;
- HANDLE hEvent;
- <span id="removedchars"> NTSTATUS Status = STATUS_SUCCESS</span>;
</pre><pre class="diff" id="added">+ <span id="addedchars">KPROCESSOR_MODE \
PreviousMode</span>; + PKEVENT Event;
+ HANDLE hEvent;
+ NTSTATUS Status = STATUS_SUCCESS;
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- <span id="removedchars"> \
</span>PAGED_CODE(); </pre><pre class="diff" id="added">+ PAGED_CODE();
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- /* Check Output Safety */
- if(PreviousMode == UserMode) {
-
- _SEH_TRY {
-
- ProbeForWrite(EventHandle,
- \
sizeof(HANDLE),
- \
sizeof(ULONG));
- } _SEH_HANDLE {
-
- Status = _SEH_GetExceptionCode();
-
- <span id="removedchars"> } _SEH_END</span>;
</pre><pre class="diff" id="added">+ <span id="addedchars">PreviousMode = \
ExGetPreviousMode()</span>; +
+ if(PreviousMode == UserMode)
+ {
+ _SEH_TRY
+ {
+ ProbeForWrite(EventHandle,
+ \
sizeof(HANDLE), + \
sizeof(ULONG)); + }
+ _SEH_HANDLE
+ {
+ Status = _SEH_GetExceptionCode();
+ }
+ _SEH_END;
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- \
if(!NT_SUCCESS(Status)) return Status;
- }
-
- /* Create the Object */
- Status = ObCreateObject(PreviousMode,
- \
ExEventObjectType,
- \
ObjectAttributes,
- \
PreviousMode,
- \
NULL,
- \
sizeof(KEVENT),
- \
0,
- \
0,
- \
(PVOID*)&Event);
-
- /* Check for Success */
- if(NT_SUCCESS(Status)) {
-
- /* Initalize the Event */
- KeInitializeEvent(Event,
- \
EventType,
- \
InitialState);
-
- /* Insert it */
- Status = ObInsertObject((PVOID)Event,
- \
NULL,
- \
DesiredAccess,
- \
0,
- \
NULL,
- \
&hEvent);
- <span id="removedchars"> ObDereferenceObject(Event);</span>
</pre><pre class="diff" id="added">+ <span \
id="addedchars">if(!NT_SUCCESS(Status))</span> + {
+ return Status;
+ }
+ }
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- /* Check for \
success and return handle */
- if(NT_SUCCESS(Status)) {
-
- _SEH_TRY {
-
- *EventHandle = hEvent;
-
- } _SEH_HANDLE {
-
- Status = \
_SEH_GetExceptionCode();
-
- } _SEH_END;
- }
- }
-
- /* Return Status */
- <span id="removedchars"> return Status;</span>
</pre><pre class="diff" id="added">+ <span id="addedchars">Status = \
ObCreateObject(PreviousMode,</span> + \
ExEventObjectType, + \
\
ObjectAttributes, + \
PreviousMode, + \
NULL, + \
sizeof(KEVENT), + \
\
0, + \
0, + \
(PVOID*)&Event); + \
if(NT_SUCCESS(Status)) + {
+ KeInitializeEvent(Event,
+ \
EventType, + \
InitialState); +
+
+ Status = ObInsertObject((PVOID)Event,
+ \
NULL, + \
DesiredAccess, + \
0, + \
\
NULL, + \
&hEvent); + ObDereferenceObject(Event);
+
+ if(NT_SUCCESS(Status))
+ {
+ _SEH_TRY
+ {
+ *EventHandle = hEvent;
+ }
+ _SEH_HANDLE
+ {
+ Status = _SEH_GetExceptionCode();
+ }
+ _SEH_END;
+ }
+ }
+
+ return Status;
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> /*
* @implemented
*/
</pre><pre class="diff" id="removed">-NTSTATUS
-<span id="removedchars">S</span>TDCALL
</pre><pre class="diff" id="added">+<span id="addedchars">NTSTATUS S</span>TDCALL
</pre><pre class="diff" id="context"> NtOpenEvent(OUT PHANDLE EventHandle,
</pre><pre class="diff" id="removed">- IN \
ACCESS_MASK DesiredAccess,
- IN POBJECT_ATTRIBUTES ObjectAttributes)
</pre><pre class="diff" id="added">+ IN ACCESS_MASK DesiredAccess,
+ IN POBJECT_ATTRIBUTES ObjectAttributes)
</pre><pre class="diff" id="context"> {
</pre><pre class="diff" id="removed">- HANDLE hEvent;
- KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
- <span id="removedchars"> NTSTATUS Status = STATUS_SUCCESS</span>;
</pre><pre class="diff" id="added">+ <span id="addedchars">HANDLE \
hEvent</span>; + KPROCESSOR_MODE PreviousMode;
+ NTSTATUS Status = STATUS_SUCCESS;
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- PAGED_CODE();
- <span id="removedchars"> DPRINT("NtOpenEvent(0x%x, 0x%x, 0x%x)\n", \
EventHandle, DesiredAccess, ObjectAttributes</span>); </pre><pre class="diff" \
id="added">+ <span id="addedchars">PAGED_CODE(</span>); +
+ DPRINT("NtOpenEvent(0x%x, 0x%x, 0x%x)\n", EventHandle, \
DesiredAccess, ObjectAttributes); </pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- /* Check Output Safety */
- if(PreviousMode == UserMode) {
-
- _SEH_TRY {
-
- ProbeForWrite(EventHandle,
- \
sizeof(HANDLE),
- \
sizeof(ULONG));
- } _SEH_HANDLE {
-
- Status = _SEH_GetExceptionCode();
-
- <span id="removedchars"> } _SEH_END</span>;
</pre><pre class="diff" id="added">+ <span id="addedchars">PreviousMode = \
ExGetPreviousMode()</span>; +
+ if(PreviousMode == UserMode)
+ {
+ _SEH_TRY
+ {
+ ProbeForWrite(EventHandle,
+ \
sizeof(HANDLE), + \
sizeof(ULONG)); + }
+ _SEH_HANDLE
+ {
+ Status = _SEH_GetExceptionCode();
+ }
+ _SEH_END;
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- \
if(!NT_SUCCESS(Status)) return Status;
- }
-
- /* Open the Object */
- Status = ObOpenObjectByName(ObjectAttributes,
- \
ExEventObjectType,
- \
NULL,
- \
PreviousMode,
- \
DesiredAccess,
- \
NULL,
- <span id="removedchars"> \
&hEvent);</span> </pre><pre \
class="diff" id="added">+ <span \
id="addedchars">if(!NT_SUCCESS(Status))</span> + {
+ return Status;
+ }
+ }
+
+ Status = ObOpenObjectByName(ObjectAttributes,
+ ExEventObjectType,
+ NULL,
+ PreviousMode,
+ DesiredAccess,
+ NULL,
+ &hEvent);
</pre><pre class="diff" id="context"> \
</pre><pre class="diff" id="removed">- /* Check for success and \
return handle */
- if(NT_SUCCESS(Status)) {
-
- _SEH_TRY {
-
- *EventHandle = hEvent;
-
- } _SEH_HANDLE {
-
- Status = _SEH_GetExceptionCode();
-
- } _SEH_END;
- <span id="removedchars"> }</span>
</pre><pre class="diff" id="added">+ <span \
id="addedchars">if(NT_SUCCESS(Status))</span> + {
+ _SEH_TRY
+ {
+ *EventHandle = hEvent;
+ }
+ _SEH_HANDLE
+ {
+ Status = _SEH_GetExceptionCode();
+ }
+ _SEH_END;
+ }
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- /* Return status */
- <span id="removedchars"> </span>return Status;
</pre><pre class="diff" id="added">+ return Status;
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> /*
* @implemented
*/
</pre><pre class="diff" id="removed">-NTSTATUS
-<span id="removedchars">S</span>TDCALL
</pre><pre class="diff" id="added">+<span id="addedchars">NTSTATUS S</span>TDCALL
</pre><pre class="diff" id="context"> NtPulseEvent(IN HANDLE EventHandle,
</pre><pre class="diff" id="removed">-<span id="removedchars"> \
OUT PLONG PreviousState</span> OPTIONAL) </pre><pre class="diff" \
id="added">+<span id="addedchars"> OUT PLONG PreviousState </span> \
OPTIONAL) </pre><pre class="diff" id="context"> {
</pre><pre class="diff" id="removed">- PKEVENT Event;
- KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
- <span id="removedchars"> NTSTATUS Status = STATUS_SUCCESS</span>;
</pre><pre class="diff" id="added">+ <span id="addedchars">PKEVENT \
Event</span>; + KPROCESSOR_MODE PreviousMode;
+ NTSTATUS Status = STATUS_SUCCESS;
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- PAGED_CODE();
- DPRINT("NtPulseEvent(EventHandle 0%x PreviousState 0%x)\n",
- <span id="removedchars"> EventHandle, \
PreviousState</span>); </pre><pre class="diff" id="added">+ <span \
id="addedchars">PAGED_CODE(</span>); </pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- /* Check buffer validity */
- if(PreviousState && PreviousMode == UserMode) {
-
- _SEH_TRY {
-
- ProbeForWrite(PreviousState,
- \
sizeof(LONG),
- \
sizeof(ULONG));
- } _SEH_HANDLE {
-
- Status = _SEH_GetExceptionCode();
-
- <span id="removedchars"> } _SEH_END;</span>
</pre><pre class="diff" id="added">+ <span \
id="addedchars">DPRINT("NtPulseEvent(EventHandle 0%x PreviousState \
0%x)\n",</span> + EventHandle, PreviousState);
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- \
if(!NT_SUCCESS(Status)) return Status;
- }
-
- /* Open the Object */
- Status = ObReferenceObjectByHandle(EventHandle,
- \
EVENT_MODIFY_STATE,
- \
ExEventObjectType,
- \
PreviousMode,
- \
(PVOID*)&Event,
- \
NULL);
-
- /* Check for success */
- if(NT_SUCCESS(Status)) {
-
- /* Pulse the Event */
- LONG Prev = KePulseEvent(Event, EVENT_INCREMENT, FALSE);
- <span id="removedchars"> ObDereferenceObject(Event</span>);
</pre><pre class="diff" id="added">+ <span id="addedchars">PreviousMode = \
ExGetPreviousMode(</span>); +
+ if(PreviousState != NULL && PreviousMode == UserMode)
+ {
+ _SEH_TRY
+ {
+ ProbeForWrite(PreviousState,
+ sizeof(LONG),
+ \
sizeof(ULONG)); + }
+ _SEH_HANDLE
+ {
+ Status = _SEH_GetExceptionCode();
+ }
+ _SEH_END;
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- /* Return it */ \
- if(PreviousState) {
-
- _SEH_TRY {
-
- *PreviousState = Prev;
-
- } _SEH_HANDLE {
-
- Status = \
_SEH_GetExceptionCode();
-
- } _SEH_END;
- <span id="removedchars"> }</span>
</pre><pre class="diff" id="added">+ <span \
id="addedchars">if(!NT_SUCCESS(Status))</span> + {
+ return Status;
+ }
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="removed">- <span id="removedchars">/* Return \
Status */</span> </pre><pre class="diff" id="added">+ <span \
id="addedchars">Status = ObReferenceObjectByHandle(EventHandle,</span> + \
EVENT_MODIFY_STATE, + ExEventObjectType,
+ PreviousMode,
+ (PVOID*)&Event,
+ NULL);
+ if(NT_SUCCESS(Status))
+ {
+ LONG Prev = KePulseEvent(Event, EVENT_INCREMENT, FALSE);
+ ObDereferenceObject(Event);
+
+ if(PreviousState != NULL)
+ {
+ _SEH_TRY
+ {
+ *PreviousState = Prev;
+ }
+ _SEH_HANDLE
+ {
+ Status = _SEH_GetExceptionCode();
+ }
+ _SEH_END;
+ }
+ }
+
</pre><pre class="diff" id="context"> return Status;
}
@@ -306,202 +320,230 @@
</pre><pre class="diff" id="context"> /*
* @implemented
*/
</pre><pre class="diff" id="removed">-NTSTATUS
-<span id="removedchars">S</span>TDCALL
</pre><pre class="diff" id="added">+<span id="addedchars">NTSTATUS S</span>TDCALL
</pre><pre class="diff" id="context"> NtQueryEvent(IN HANDLE EventHandle,
</pre><pre class="diff" id="removed">- IN \
EVENT_INFORMATION_CLASS EventInformationClass, </pre>
<strong class="error">[truncated at 1000 lines; 13561 more skipped]</strong>
</div>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic