Executive Library Support R ...


Windows Driver Kit: Kernel-Mode Driver Architecture
PAGED_CODE

The PAGED_CODE macro ensures that the calling thread is running at an IRQL that is low enough to permit paging.

VOID
  PAGED_CODE(
    void
    );

Parameters

None

Return Value

None

Comments

If the IRQL > APC_LEVEL, PAGED_CODE() causes the system to ASSERT.

A call to this macro should be made at the beginning of every driver routine that either contains pageable code or accesses pageable code.

The PAGED_CODE macro only checks IRQL at the point the code executes the macro. If the code subsequently raises IRQL, it will not be detected. Driver writers should use the driver verifier to detect when the IRQL is raised improperly.

PAGED_CODE only works in checked builds.

Requirements

IRQL: See Comments section.

Headers: Declared in Wdm.h. Include Wdm.h, Ntddk.h, or Ntifs.h.


Send feedback on this topic
Built on November 19, 2009
Page view tracker