|
ReactOS 0.4.17-dev-806-gffa4164
|

Go to the source code of this file.
Macros | |
| #define | NDEBUG |
| #define | ARBITER_ALLOCATE_DEADLINE (10ULL * 1000 * 1000) /* 1 second */ |
| #define | ARBITER_ALLOCATE_HARD_DEADLINE (10ULL * 1000 * 1000 * 10) /* 10 seconds */ |
Functions | |
| NTSTATUS NTAPI | ArbiterLibPreprocessEntry (_In_ PARBITER_INSTANCE Arbiter, _Inout_ PARBITER_ALLOCATION_STATE ArbState) |
| Per-entry hook invoked before each placement attempt. The library default does nothing and succeeds. | |
| NTSTATUS NTAPI | ArbiterLibSortArbitrationList (_Inout_ PLIST_ENTRY ArbitrationList) |
| Orders an arbitration list most-constrained first, so fixed requirements are placed before flexible ones can steal their ranges. | |
| static VOID | ArbpFreeAllocationWorkSpaces (_Inout_ PARBITER_ALLOCATION_STATE ArbState) |
| Releases the per-entry workspace a PreprocessEntry override allocated, across the whole allocation stack. | |
| static VOID | ArbpReportConflictingRanges (_In_ PARBITER_INSTANCE Arbiter, _In_ ULONGLONG Minimum, _In_ ULONGLONG Maximum) |
| Says what an arbiter is already holding across a window. | |
| NTSTATUS NTAPI | ArbiterLibAllocateEntry (_In_ PARBITER_INSTANCE Arbiter, _Inout_ PARBITER_ALLOCATION_STATE ArbState) |
| Places the whole stack of entries with backtracking: when an entry cannot be placed, the previous entry's tentative choice is withdrawn and varied, first lower within its window, then via its next window or alternative. | |
| #define ARBITER_ALLOCATE_DEADLINE (10ULL * 1000 * 1000) /* 1 second */ |
| #define ARBITER_ALLOCATE_HARD_DEADLINE (10ULL * 1000 * 1000 * 10) /* 10 seconds */ |
| NTSTATUS NTAPI ArbiterLibAllocateEntry | ( | _In_ PARBITER_INSTANCE | Arbiter, |
| _Inout_ PARBITER_ALLOCATION_STATE | ArbState | ||
| ) |
Places the whole stack of entries with backtracking: when an entry cannot be placed, the previous entry's tentative choice is withdrawn and varied, first lower within its window, then via its next window or alternative.
| [in] | Arbiter | The arbiter instance whose walker callbacks (GetNextAllocationRange, FindSuitableRange, AddAllocation, BacktrackAllocation) drive each placement. |
| [in,out] | ArbState | The first ARBITER_ALLOCATION_STATE of the allocation stack, one per entry in most-constrained-first order, terminated by a state whose Entry is NULL. |
Definition at line 223 of file entry.c.
Referenced by ArbiterLibInitializeInstance().
| NTSTATUS NTAPI ArbiterLibPreprocessEntry | ( | _In_ PARBITER_INSTANCE | Arbiter, |
| _Inout_ PARBITER_ALLOCATION_STATE | ArbState | ||
| ) |
Per-entry hook invoked before each placement attempt. The library default does nothing and succeeds.
| [in] | Arbiter | The arbiter instance placing the entry. |
| [in,out] | ArbState | The allocation state of the entry about to be placed. |
Definition at line 38 of file entry.c.
Referenced by ArbiterLibInitializeInstance().
| NTSTATUS NTAPI ArbiterLibSortArbitrationList | ( | _Inout_ PLIST_ENTRY | ArbitrationList | ) |
Orders an arbitration list most-constrained first, so fixed requirements are placed before flexible ones can steal their ranges.
| [in,out] | ArbitrationList | The list of ARBITER_LIST_ENTRY nodes to sort, keyed on the WorkSpace constrainedness score in ascending order. The sort is stable: equally scored entries keep their relative order. |
Definition at line 71 of file entry.c.
Referenced by ArbpTestAllocation().
|
static |
Releases the per-entry workspace a PreprocessEntry override allocated, across the whole allocation stack.
| [in,out] | ArbState | The first state of the allocation stack. |
Definition at line 121 of file entry.c.
Referenced by ArbiterLibAllocateEntry().
|
static |
Says what an arbiter is already holding across a window.
The bare "arbitration failed" a caller reports names the device that could not be placed but not what stopped it, which is the half worth knowing: a fixed requirement can fail either because the window belongs to somebody else or because it was never the arbiter's to give. Both look the same from outside.
| [in] | Arbiter | The arbiter whose bookkeeping to read. |
| [in] | Minimum | The bottom of the window that could not be satisfied. |
| [in] | Maximum | The top of it. |
Definition at line 161 of file entry.c.
Referenced by ArbiterLibAllocateEntry().