Author: jimtabor
Date: Fri Jul 11 05:57:49 2008
New Revision: 34423
URL:
http://svn.reactos.org/svn/reactos?rev=34423&view=rev
Log:
Update Eng Events and fix InputIdleEvent.
Modified:
trunk/reactos/subsystems/win32/win32k/eng/event.c
trunk/reactos/subsystems/win32/win32k/include/tags.h
trunk/reactos/subsystems/win32/win32k/include/win32.h
Modified: trunk/reactos/subsystems/win32/win32k/eng/event.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/event.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/event.c [iso-8859-1] Fri Jul 11 05:57:49
2008
@@ -17,7 +17,7 @@
STDCALL
EngCreateEvent ( OUT PEVENT *Event )
{
- (*Event) = ExAllocatePool(NonPagedPool, sizeof(KEVENT));
+ (*Event) = ExAllocatePoolWithTag(NonPagedPool, sizeof(KEVENT), TAG_DFSM);
if ((*Event) == NULL)
{
return FALSE;
@@ -45,6 +45,9 @@
NTSTATUS Status;
PKEVENT Event;
+ Event = ExAllocatePoolWithTag(NonPagedPool, sizeof(KEVENT), TAG_DFSM);
+ if (!Event) return NULL;
+
Status = ObReferenceObjectByHandle(UserObject,
EVENT_MODIFY_STATE,
ExEventObjectType,
@@ -52,9 +55,15 @@
(PVOID*)&Event,
NULL);
if (!NT_SUCCESS(Status))
- {
- return NULL;
- }
+ {
+ ExFreePool(Event);
+ return NULL;
+ }
+ else
+ KePulseEvent(Event, EVENT_INCREMENT, FALSE);
+
+ if (Reserved1) Reserved1 = Event;
+
return (PEVENT)Event;
}
@@ -70,6 +79,7 @@
EngUnmapEvent ( IN PEVENT Event )
{
ObDereferenceObject((PVOID)Event);
+ ExFreePool(Event);
return TRUE;
}
@@ -79,6 +89,8 @@
IN PLARGE_INTEGER TimeOut)
{
NTSTATUS Status;
+
+ if (!Event) return FALSE;
Status = KeWaitForSingleObject(Event,
Executive,
Modified: trunk/reactos/subsystems/win32/win32k/include/tags.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/tags.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/tags.h [iso-8859-1] Fri Jul 11 05:57:49
2008
@@ -75,6 +75,7 @@
/* Eng objects */
#define TAG_CLIPOBJ TAG('C', 'L', 'P', 'O') /* clip
object */
#define TAG_DRIVEROBJ TAG('D', 'R', 'V', 'O') /* driver
object */
+#define TAG_DFSM TAG('D', 'f', 's', 'm') /* Eng
event allocation */
#define TAG_FONT TAG('F', 'N', 'T', 'E') /* font
entry */
#define TAG_FONTOBJ TAG('G', 'f', 'n', 't') /* font
object */
#define TAG_WNDOBJ TAG('W', 'N', 'D', 'O') /* window
object */
Modified: trunk/reactos/subsystems/win32/win32k/include/win32.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/win32.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/win32.h [iso-8859-1] Fri Jul 11 05:57:49
2008
@@ -43,7 +43,7 @@
ULONG Flags;
LONG GDIObjects;
LONG UserObjects;
- KEVENT InputIdleEvent;
+ PKEVENT InputIdleEvent;
W32HEAP_USER_MAPPING HeapMappings;
PW32PROCESSINFO ProcessInfo;