Export (0) Print
Expand All
Expand Minimize

PAGED_CODE macro

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

Syntax


VOID PAGED_CODE(void);

Parameters

This macro has no parameters.

Return value

None

Remarks

If the IRQL > APC_LEVEL, the PAGED_CODE macro 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 checks the IRQL only at the point at which the driver code executes the macro. If the code subsequently raises the IRQL, the macro will not detect this change. Driver developers should use Static Driver Verifier and Driver Verifier to detect when the IRQL is raised improperly during the execution of a driver routine.

The PAGED_CODE macro works only in checked builds.

Requirements

Version

Available starting with Windows 2000.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

IRQL

See Remarks section.

DDI compliance rules

PagedCode, PagedCodeAtPowerTrans, KmdfIrql, KmdfIrql2, PagedCodeAtD0, PagedCode(storport)

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft