Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

RtlFindFirstRunClear routine

The RtlFindFirstRunClear routine searches for the initial contiguous range of clear bits within a given bitmap.

Syntax


ULONG RtlFindFirstRunClear(
  _In_  PRTL_BITMAP BitMapHeader,
  _Out_ PULONG      StartingIndex
);

Parameters

BitMapHeader [in]

A pointer to the RTL_BITMAP structure that describes the bitmap. This structure must have been initialized by the RtlInitializeBitMap routine.

StartingIndex [out]

Pointer to a variable in which the starting index of the initial clear run in the bitmap is returned. This is a zero-based value indicating the bit position of the first clear bit in the returned range. Its value is meaningless if RtlFindFirstRunClear cannot find a run of clear bits.

Return value

RtlFindFirstRunClear returns either the number of bits in the run beginning at StartingIndex, or zero if it cannot find a run of clear bits within the bitmap.

Remarks

A returned run can have a single clear bit. That is, once a clear bit is found, RtlFindFirstRunClear continues searching until it finds the next set bit, and then returns the number of clear bits in the run it found.

Callers of RtlFindFirstRunClear must be running at IRQL <= APC_LEVEL if the memory that contains the bitmap variable is pageable or the memory at BitMapHeader is pageable. Otherwise, RtlFindFirstRunClear can be called at any IRQL.

Requirements

Target platform

Universal

Version

Available starting with Windows 2000.

Header

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

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

IRQL

<= APC_LEVEL (See Remarks section)

See also

RtlAreBitsClear
RTL_BITMAP
RtlFindClearBits
RtlFindClearRuns
RtlFindFirstRunClear
RtlFindLastBackwardRunClear
RtlFindLongestRunClear
RtlFindNextForwardRunClear
RtlSetBits
RtlInitializeBitMap
RtlNumberOfClearBits

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft