Author: ekohl
Date: Sun Feb 1 13:59:09 2015
New Revision: 66139
URL:
http://svn.reactos.org/svn/reactos?rev=66139&view=rev
Log:
[NTOSKRNL][INCLUDE]
Add keyed event access mask values and use them in the keyed event object implementation.
This fixes another kmtest:ObTypes bug.
Modified:
trunk/reactos/include/ndk/extypes.h
trunk/reactos/ntoskrnl/ex/keyedevt.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 Feb 1 13:59:09 2015
@@ -129,6 +129,15 @@
//
#define PROFILE_CONTROL 0x0001
#define PROFILE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | PROFILE_CONTROL)
+
+//
+// Keyed Event Object Access Masks
+//
+#define KEYEDEVENT_WAIT 0x0001
+#define KEYEDEVENT_WAKE 0x0002
+#define KEYEDEVENT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \
+ KEYEDEVENT_WAIT | \
+ KEYEDEVENT_WAKE)
//
// NtRaiseHardError-related parameters
Modified: trunk/reactos/ntoskrnl/ex/keyedevt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/keyedevt.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/keyedevt.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/keyedevt.c [iso-8859-1] Sun Feb 1 13:59:09 2015
@@ -43,10 +43,10 @@
static
GENERIC_MAPPING ExpKeyedEventMapping =
{
- STANDARD_RIGHTS_READ | EVENT_QUERY_STATE,
- STANDARD_RIGHTS_WRITE | EVENT_MODIFY_STATE,
+ STANDARD_RIGHTS_READ | KEYEDEVENT_WAIT,
+ STANDARD_RIGHTS_WRITE | KEYEDEVENT_WAKE,
STANDARD_RIGHTS_EXECUTE,
- EVENT_ALL_ACCESS
+ KEYEDEVENT_ALL_ACCESS
};
/* FUNCTIONS *****************************************************************/
@@ -68,7 +68,7 @@
ObjectTypeInitializer.Length = sizeof(ObjectTypeInitializer);
ObjectTypeInitializer.GenericMapping = ExpKeyedEventMapping;
ObjectTypeInitializer.PoolType = PagedPool;
- ObjectTypeInitializer.ValidAccessMask = EVENT_ALL_ACCESS;
+ ObjectTypeInitializer.ValidAccessMask = KEYEDEVENT_ALL_ACCESS;
ObjectTypeInitializer.UseDefaultObject = TRUE;
/* Create the keyed event object type */
@@ -81,14 +81,14 @@
/* Create the out of memory event for critical sections */
InitializeObjectAttributes(&ObjectAttributes, &Name, OBJ_PERMANENT, NULL,
NULL);
Status = ZwCreateKeyedEvent(&EventHandle,
- EVENT_ALL_ACCESS,
+ KEYEDEVENT_ALL_ACCESS,
&ObjectAttributes,
0);
if (NT_SUCCESS(Status))
{
/* Take a reference so we can get rid of the handle */
Status = ObReferenceObjectByHandle(EventHandle,
- EVENT_ALL_ACCESS,
+ KEYEDEVENT_ALL_ACCESS,
ExKeyedEventObjectType,
KernelMode,
(PVOID*)&ExpCritSecOutOfMemoryEvent,
@@ -258,8 +258,8 @@
ExpReleaseKeyedEvent(
_Inout_ PEX_KEYED_EVENT KeyedEvent,
_In_ PVOID KeyedWaitValue,
- _In_ BOOLEAN Alertable,
- _In_ PLARGE_INTEGER Timeout)
+ _In_ BOOLEAN Alertable,
+ _In_ PLARGE_INTEGER Timeout)
{
/* Call the generic internal function */
return ExpReleaseOrWaitForKeyedEvent(KeyedEvent,
@@ -433,7 +433,7 @@
{
/* Get the keyed event object */
Status = ObReferenceObjectByHandle(Handle,
- EVENT_MODIFY_STATE,
+ KEYEDEVENT_WAIT,
ExKeyedEventObjectType,
PreviousMode,
(PVOID*)&KeyedEvent,
@@ -493,7 +493,7 @@
{
/* Get the keyed event object */
Status = ObReferenceObjectByHandle(Handle,
- EVENT_MODIFY_STATE,
+ KEYEDEVENT_WAKE,
ExKeyedEventObjectType,
PreviousMode,
(PVOID*)&KeyedEvent,