70 if (RangeEntry ==
NULL)
85 if (RangeList->Count == 0)
96 Entry = RangeList->ListHead.Flink;
97 while (
Entry != &RangeList->ListHead)
103 DPRINT(
"Insert before current\n");
155 CopyRangeList->Flags = RangeList->Flags;
157 Entry = RangeList->ListHead.Flink;
158 while (
Entry != &RangeList->ListHead)
163 if (NewEntry ==
NULL)
173 CopyRangeList->Count++;
178 CopyRangeList->Stamp++;
209 Entry = RangeList->ListHead.Flink;
210 while (
Entry != &RangeList->ListHead)
257 Entry = RangeList->ListHead.Flink;
258 while (
Entry != &RangeList->ListHead)
316 IN UCHAR AttributeAvailableMask,
339 Entry = RangeList->ListHead.Blink;
340 while (
Entry != &RangeList->ListHead)
344 RangeMax = NextEntry ? (NextEntry->
Range.
Start - 1) : Maximum;
345 if (RangeMax + (
Length - 1) < Minimum)
351 if (RangeMin < Minimum ||
352 (RangeMax - RangeMin) < (
Length - 1))
357 DPRINT(
"RangeMax: %I64x\n", RangeMax);
358 DPRINT(
"RangeMin: %I64x\n", RangeMin);
360 if (RangeMin > CurrentEntry->
Range.
End)
366 NextEntry = CurrentEntry;
370 RangeMax = NextEntry ? (NextEntry->
Range.
Start - 1) : Maximum;
371 if (RangeMax + (
Length - 1) < Minimum)
377 if (RangeMin < Minimum ||
378 (RangeMax - RangeMin) < (
Length - 1))
383 DPRINT(
"RangeMax: %I64x\n", RangeMax);
384 DPRINT(
"RangeMin: %I64x\n", RangeMin);
425 RangeList->Flags = 0;
426 RangeList->Count = 0;
453 Iterator->RangeListHead = &RangeList->ListHead;
464 Iterator->Current = RangeList->ListHead.Flink;
517 if (Next ==
Iterator->RangeListHead)
551 RangeList->Flags = 0;
552 RangeList->Count = 0;
553 RangeList->Stamp = 0;
585 Entry = RangeList->ListHead.Flink;
586 while (
Entry != &RangeList->ListHead)
590 if (Previous ==
NULL)
626 if (Previous ==
NULL)
681 IN UCHAR AttributeAvailableMask,
691 Entry = RangeList->ListHead.Flink;
692 while (
Entry != &RangeList->ListHead)
#define NT_SUCCESS(StatCode)
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define IsListEmpty(ListHead)
#define RemoveHeadList(ListHead)
#define InitializeListHead(ListHead)
#define ROUND_DOWN(n, align)
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ OwnerSize PSID Owner
#define RTL_RANGE_LIST_ADD_SHARED
BOOLEAN(NTAPI * PRTL_CONFLICT_RANGE_CALLBACK)(PVOID Context, struct _RTL_RANGE *Range)
__GNU_EXTENSION typedef unsigned __int64 * PULONGLONG
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define STATUS_NO_MORE_ENTRIES
#define STATUS_RANGE_NOT_FOUND
NTSTATUS NTAPI RtlDeleteOwnersRanges(IN OUT PRTL_RANGE_LIST RangeList, IN PVOID Owner)
NTSTATUS NTAPI RtlFindRange(IN PRTL_RANGE_LIST RangeList, IN ULONGLONG Minimum, IN ULONGLONG Maximum, IN ULONG Length, IN ULONG Alignment, IN ULONG Flags, IN UCHAR AttributeAvailableMask, IN PVOID Context OPTIONAL, IN PRTL_CONFLICT_RANGE_CALLBACK Callback OPTIONAL, OUT PULONGLONG Start)
NTSTATUS NTAPI RtlGetFirstRange(IN PRTL_RANGE_LIST RangeList, OUT PRTL_RANGE_LIST_ITERATOR Iterator, OUT PRTL_RANGE *Range)
VOID NTAPI RtlInitializeRangeList(IN OUT PRTL_RANGE_LIST RangeList)
NTSTATUS NTAPI RtlCopyRangeList(OUT PRTL_RANGE_LIST CopyRangeList, IN PRTL_RANGE_LIST RangeList)
NTSTATUS NTAPI RtlIsRangeAvailable(IN PRTL_RANGE_LIST RangeList, IN ULONGLONG Start, IN ULONGLONG End, IN ULONG Flags, IN UCHAR AttributeAvailableMask, IN PVOID Context OPTIONAL, IN PRTL_CONFLICT_RANGE_CALLBACK Callback OPTIONAL, OUT PBOOLEAN Available)
struct _RTL_RANGE_ENTRY * PRTL_RANGE_ENTRY
NTSTATUS NTAPI RtlGetNextRange(IN OUT PRTL_RANGE_LIST_ITERATOR Iterator, OUT PRTL_RANGE *Range, IN BOOLEAN MoveForwards)
NTSTATUS NTAPI RtlDeleteRange(IN OUT PRTL_RANGE_LIST RangeList, IN ULONGLONG Start, IN ULONGLONG End, IN PVOID Owner)
VOID NTAPI RtlFreeRangeList(IN PRTL_RANGE_LIST RangeList)
NTSTATUS NTAPI RtlAddRange(IN OUT PRTL_RANGE_LIST RangeList, IN ULONGLONG Start, IN ULONGLONG End, IN UCHAR Attributes, IN ULONG Flags, IN PVOID UserData OPTIONAL, IN PVOID Owner OPTIONAL)
NTSTATUS NTAPI RtlMergeRangeLists(OUT PRTL_RANGE_LIST MergedRangeList, IN PRTL_RANGE_LIST RangeList1, IN PRTL_RANGE_LIST RangeList2, IN ULONG Flags)
struct _RTL_RANGE_ENTRY RTL_RANGE_ENTRY
NTSTATUS NTAPI RtlInvertRangeList(OUT PRTL_RANGE_LIST InvertedRangeList, IN PRTL_RANGE_LIST RangeList)
PVOID NTAPI RtlpAllocateMemory(_In_ ULONG Bytes, _In_ ULONG Tag)
VOID NTAPI RtlpFreeMemory(_In_ PVOID Mem, _In_ ULONG Tag)
PULONG MinorVersion OPTIONAL
base of all file and directory entries
struct _LIST_ENTRY * Blink
struct _LIST_ENTRY * Flink
#define RtlCopyMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
_In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR Iterator
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
_Must_inspect_result_ _In_ ULONG Flags