|
ReactOS 0.4.17-dev-769-g1500a35
|

Go to the source code of this file.
Macros | |
| #define | NDEBUG |
Functions | |
| static NTSTATUS | ArbpBuildAlternative (_In_ PARBITER_INSTANCE Arbiter, _In_ PIO_RESOURCE_DESCRIPTOR Descriptor, _Out_ PARBITER_ALTERNATIVE Alternative) |
| Expands one IO_RESOURCE_DESCRIPTOR into an ARBITER_ALTERNATIVE through the arbiter's UnpackRequirement callback and identifies it. | |
| static NTSTATUS | ArbpBuildAllocationStack (_In_ PARBITER_INSTANCE Arbiter, _In_ PLIST_ENTRY ArbitrationList, _In_ ULONG EntryCount) |
| Builds the allocation stack for an arbitration list into Arbiter->AllocationStack: one ARBITER_ALLOCATION_STATE per contributing entry, in list order, terminated by a state whose Entry is NULL, followed by the flattened ARBITER_ALTERNATIVE array the states point into. | |
| static NTSTATUS | ArbpTestAllocation (_In_ PARBITER_INSTANCE Arbiter, _In_ PLIST_ENTRY ArbitrationList) |
| Test-allocates every entry on an arbitration list into the arbiter's tentative allocation. The shared implementation behind ArbiterLibAttemptAllocation. | |
| static NTSTATUS | ArbpRetestAllocation (_In_ PARBITER_INSTANCE Arbiter, _In_ PLIST_ENTRY ArbitrationList) |
| Re-establishes a previously tested solution in the arbiter's tentative allocation without searching again: every entry's SelectedAlternative is re-materialized at the position recorded in its Assignment. | |
| NTSTATUS NTAPI | ArbiterLibTestAllocation (_In_ PARBITER_INSTANCE Arbiter, _Inout_ PARBITER_TEST_ALLOCATION_PARAMETERS Parameters) |
| The TestAllocation action: tentatively places every entry of the arbitration list, leaving the solution in PossibleAllocation for a later commit or rollback. | |
| NTSTATUS NTAPI | ArbiterLibRetestAllocation (_In_ PARBITER_INSTANCE Arbiter, _Inout_ PARBITER_RETEST_ALLOCATION_PARAMETERS Parameters) |
| The RetestAllocation action: deterministically re-establishes the placements a previous test chose, without searching. | |
| NTSTATUS NTAPI | ArbiterLibCommitAllocation (_In_ PARBITER_INSTANCE Arbiter) |
| The CommitAllocation action: the tentative PossibleAllocation becomes the committed Allocation, and the old committed list is recycled as the next scratch list. | |
| NTSTATUS NTAPI | ArbiterLibRollbackAllocation (_In_ PARBITER_INSTANCE Arbiter) |
| The RollbackAllocation action: discards the tentative allocation; the committed one is untouched. | |
| #define NDEBUG |
Definition at line 14 of file transaction.c.
| NTSTATUS NTAPI ArbiterLibCommitAllocation | ( | _In_ PARBITER_INSTANCE | Arbiter | ) |
The CommitAllocation action: the tentative PossibleAllocation becomes the committed Allocation, and the old committed list is recycled as the next scratch list.
| [in] | Arbiter | The arbiter instance whose transaction is committed. |
Definition at line 501 of file transaction.c.
Referenced by ArbiterLibInitializeInstance().
| NTSTATUS NTAPI ArbiterLibRetestAllocation | ( | _In_ PARBITER_INSTANCE | Arbiter, |
| _Inout_ PARBITER_RETEST_ALLOCATION_PARAMETERS | Parameters | ||
| ) |
The RetestAllocation action: deterministically re-establishes the placements a previous test chose, without searching.
| [in] | Arbiter | The arbiter instance performing the retest. |
| [in,out] | Parameters | The action parameters carrying the arbitration list (pre-Vista builds receive the list directly). |
Definition at line 469 of file transaction.c.
Referenced by ArbiterLibInitializeInstance().
| NTSTATUS NTAPI ArbiterLibRollbackAllocation | ( | _In_ PARBITER_INSTANCE | Arbiter | ) |
The RollbackAllocation action: discards the tentative allocation; the committed one is untouched.
| [in] | Arbiter | The arbiter instance whose transaction is rolled back. |
Definition at line 529 of file transaction.c.
Referenced by ArbiterLibInitializeInstance().
| NTSTATUS NTAPI ArbiterLibTestAllocation | ( | _In_ PARBITER_INSTANCE | Arbiter, |
| _Inout_ PARBITER_TEST_ALLOCATION_PARAMETERS | Parameters | ||
| ) |
The TestAllocation action: tentatively places every entry of the arbitration list, leaving the solution in PossibleAllocation for a later commit or rollback.
| [in] | Arbiter | The arbiter instance performing the test. |
| [in,out] | Parameters | The action parameters carrying the arbitration list (pre-Vista builds receive the list directly). |
Definition at line 433 of file transaction.c.
Referenced by ArbiterLibInitializeInstance().
|
static |
Builds the allocation stack for an arbitration list into Arbiter->AllocationStack: one ARBITER_ALLOCATION_STATE per contributing entry, in list order, terminated by a state whose Entry is NULL, followed by the flattened ARBITER_ALTERNATIVE array the states point into.
| [in] | Arbiter | The arbiter instance whose AllocationStack buffer is (re)used, growing it when the list needs more room. |
| [in] | ArbitrationList | The (sorted) list of ARBITER_LIST_ENTRY nodes to flatten. Entries without alternatives contribute no state. |
| [in] | EntryCount | The number of entries on the list. |
Definition at line 119 of file transaction.c.
Referenced by ArbpTestAllocation().
|
static |
Expands one IO_RESOURCE_DESCRIPTOR into an ARBITER_ALTERNATIVE through the arbiter's UnpackRequirement callback and identifies it.
| [in] | Arbiter | The arbiter instance whose UnpackRequirement decodes the descriptor. |
| [in] | Descriptor | The requirement descriptor to expand. |
| [out] | Alternative | Receives the decoded window, length, alignment and the derived FIXED / SHARED / INVALID flags. The minimum is rounded up to the requested alignment first, so a misaligned window base does not later affect the range search. |
Definition at line 44 of file transaction.c.
Referenced by ArbpBuildAllocationStack(), and ArbpRetestAllocation().
|
static |
Re-establishes a previously tested solution in the arbiter's tentative allocation without searching again: every entry's SelectedAlternative is re-materialized at the position recorded in its Assignment.
| [in] | Arbiter | The arbiter instance whose PossibleAllocation is rebuilt from the committed allocation. |
| [in] | ArbitrationList | The list of entries from an earlier successful test: each must carry the SelectedAlternative and Assignment that test produced, except entries whose Result is ArbiterResultNullRequest, which are skipped. |
Definition at line 323 of file transaction.c.
Referenced by ArbiterLibRetestAllocation().
|
static |
Test-allocates every entry on an arbitration list into the arbiter's tentative allocation. The shared implementation behind ArbiterLibAttemptAllocation.
| [in] | Arbiter | The arbiter instance whose PossibleAllocation receives the tentative solution. |
| [in] | ArbitrationList | The list of ARBITER_LIST_ENTRY nodes to place. Everything a listed device already owns is removed from the working list first, so a device does not conflict with itself (its boot configuration in particular). |
Definition at line 220 of file transaction.c.
Referenced by ArbiterLibTestAllocation().