32 DPRINT1(
"Unaligned SListHead: 0x%p\n", SListHead);
39 SListHead->Region = (
ULONG_PTR)SListHead & VRN_MASK;
42 SListHead->Region = 0;
46 SListHead->Alignment = 0;
56 if (SListHead->Header16.HeaderType)
58 return (
PVOID)(SListHead->Region & ~0xFLL);
73 Pointer.Region = SListHead->Region;
76 Pointer.Region = (
ULONG64)SListHead;
78 Pointer.Bits.NextEntry = SListHead->Header8.NextEntry;
79 return (
PVOID)Pointer.Region;
82 return SListHead->Next.Next;
92 return (
USHORT)(SListHead->Alignment & 0xffff);
94 return SListHead->Depth;
120 OldSListHead = *SListHead;
123 FirstEntry = (
PSLIST_ENTRY)(SListHead->Region & ~0xFLL);
127 NewSListHead = OldSListHead;
131 NewSListHead.Header16.HeaderType = 1;
132 NewSListHead.Header16.Init = 1;
135 exchanged = _InterlockedCompareExchange128((
PLONG64)SListHead,
139 }
while (!exchanged);
152 OldSListHead = *SListHead;
157 FirstEntry = (
PSLIST_ENTRY)((OldSListHead.Header8.NextEntry << 4) |
158 ((
ULONG64)SListHead & 0xFFFFF80000000000ull));
164 NewSListHead = OldSListHead;
165 NewSListHead.Header8.NextEntry = (
ULONG64)
List >> 4;
174 }
while (OldSListHead.
Alignment != Compare);
184 OldHeader = *SListHead;
192 NewHeader = OldHeader;
206 return OldHeader.
Next.Next;
211#if !defined(_M_IX86) && !defined(_M_AMD64)
213_WARN(
"C based S-List functions can bugcheck, if not handled properly in kernel")
216#error "No generic S-List functions for WIN64!"
234 OldHeader = *SListHead;
239 SListEntry->
Next = OldHeader.
Next.Next;
242 NewHeader = OldHeader;
243 NewHeader.
Next.Next = SListEntry;
256 return OldHeader.
Next.Next;
270 OldHeader = *SListHead;
281 NewHeader = OldHeader;
289 NewHeader.
Next = *OldHeader.
Next.Next;
315 return OldHeader.
Next.Next;
327 OldHeader = *SListHead;
338 NewHeader = OldHeader;
351 return OldHeader.
Next.Next;
356#pragma comment(linker, "/alternatename:ExpInterlockedPopEntrySList=RtlInterlockedPopEntrySList")
357#pragma comment(linker, "/alternatename:ExpInterlockedPushEntrySList=RtlInterlockedPushEntrySList")
358#pragma comment(linker, "/alternatename:ExpInterlockedFlushSList=RtlInterlockedFlushSList")
360#pragma redefine_extname RtlInterlockedPopEntrySList ExpInterlockedPopEntrySList
361#pragma redefine_extname RtlInterlockedPushEntrySList ExpInterlockedPushEntrySList
362#pragma redefine_extname RtlInterlockedFlushSList ExpInterlockedFlushSList
void restart(int argc, const char *argv[])
#define EXCEPTION_EXECUTE_HANDLER
#define EXCEPTION_CONTINUE_SEARCH
#define InterlockedCompareExchange64
BOOLEAN RtlpUse16ByteSLists
DECLSPEC_NORETURN NTSYSAPI VOID NTAPI RtlRaiseStatus(_In_ NTSTATUS Status)
__GNU_EXTENSION typedef __int64 * PLONGLONG
#define STATUS_DATATYPE_MISALIGNMENT
#define _SEH2_EXCEPT(...)
PSLIST_ENTRY NTAPI RtlInterlockedPushEntrySList(_Inout_ PSLIST_HEADER SListHead, _Inout_ __drv_aliasesMem PSLIST_ENTRY SListEntry)
PSLIST_ENTRY FASTCALL RtlInterlockedPushListSList(_Inout_ PSLIST_HEADER SListHead, _Inout_ __drv_aliasesMem PSLIST_ENTRY List, _Inout_ PSLIST_ENTRY ListEnd, _In_ ULONG Count)
PSLIST_ENTRY NTAPI RtlInterlockedFlushSList(_Inout_ PSLIST_HEADER SListHead)
WORD NTAPI RtlQueryDepthSList(_In_ PSLIST_HEADER SListHead)
VOID NTAPI RtlInitializeSListHead(_Out_ PSLIST_HEADER SListHead)
BOOLEAN RtlpExpectSListFault
PSLIST_ENTRY NTAPI RtlInterlockedPopEntrySList(_Inout_ PSLIST_HEADER SListHead)
PSLIST_ENTRY NTAPI RtlFirstEntrySList(_In_ const SLIST_HEADER *SListHead)
_Must_inspect_result_ _In_ WDFCMRESLIST List
_Reserved_ PVOID Reserved
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY ListEnd