So, for lack of a real life, I was reading the DDK, and under the reference
page for KeInitializeEvent is says:
“Callers of this routine must be running at IRQL PASSIVE_LEVEL.” I could
have sworn that it used to say: “Callers of this routine must be running at
IRQL < DISPATCH_LEVEL.” However I dusted off the NT 4.0 DDK which says:
“Callers of this routine must be running at IRQL PASSIVE_LEVEL.” Huh.
So I look through ntddk.h to see what might be in a KEVENT that would cause
it to require field initialization at PASSIVE_LEVEL.
typedef struct _KEVENT {
DISPATCHER_HEADER Header;
} KEVENT, *PKEVENT, *RESTRICTED_POINTER PRKEVENT;
typedef struct _DISPATCHER_HEADER {
UCHAR Type;
UCHAR Absolute;
UCHAR Size;
UCHAR Inserted;
LONG SignalState;
LIST_ENTRY WaitListHead;
} DISPATCHER_HEADER;
Perhaps it might be that WaitListHead? I thought this unlikely, and a simple
experiment established that the KEVENT is basically initialized to zero with
the list intialized to point to itself.
So, anybody have a clue as to why, other than “we can do whatever we want,
it’s our operating system” the DDK insists that this stuffing of zeroes into
memory locations has to be done at PASSIVE_LEVEL? In fact, I can see no
reason why KeInitializeEvent couldn’t be called at ANY IRQL, as long as the
memory is non-pageable.
Mark Roddy
Windows 2000/NT Consultant
Hollis Technology Solutions
www.hollistech.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com