From 6991aa7bb0642943e837860e4e24a75ba4c613a9 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Thu, 21 May 2009 17:51:59 +0000 Subject: [PATCH] wdm.h: fix definition of 64bit SLIST_HEADER winnt.h: add 64bit SLIST_HEADER svn path=/branches/ros-amd64-bringup/; revision=41030 --- reactos/include/ddk/wdm.h | 4 +-- reactos/include/psdk/winnt.h | 49 ++++++++++++++++++++++++++++++------ 2 files changed, 43 insertions(+), 10 deletions(-) diff --git a/reactos/include/ddk/wdm.h b/reactos/include/ddk/wdm.h index 6889a2c9d58..ef23680228e 100644 --- a/reactos/include/ddk/wdm.h +++ b/reactos/include/ddk/wdm.h @@ -393,7 +393,7 @@ InterlockedAdd64( #define PSLIST_ENTRY PSINGLE_LIST_ENTRY #if defined(_WIN64) -typedef union _SLIST_HEADER { +typedef union DECLSPEC_ALIGN(16) _SLIST_HEADER { struct { ULONGLONG Alignment; ULONGLONG Region; @@ -407,13 +407,13 @@ typedef union _SLIST_HEADER { ULONGLONG Reserved:59; ULONGLONG Region:3; } Header8; + struct { ULONGLONG Depth:16; ULONGLONG Sequence:48; ULONGLONG HeaderType:1; ULONGLONG Init:1; ULONGLONG Reserved:2; ULONGLONG NextEntry:60; - struct { } Header16; } SLIST_HEADER, *PSLIST_HEADER; #else diff --git a/reactos/include/psdk/winnt.h b/reactos/include/psdk/winnt.h index b2f8e4dfec0..60fedac2c32 100644 --- a/reactos/include/psdk/winnt.h +++ b/reactos/include/psdk/winnt.h @@ -3207,20 +3207,53 @@ typedef struct _SINGLE_LIST_ENTRY { struct _SINGLE_LIST_ENTRY *Next; } SINGLE_LIST_ENTRY,*PSINGLE_LIST_ENTRY; +// +// Slist Header +// #ifndef _SLIST_HEADER_ #define _SLIST_HEADER_ + #define SLIST_ENTRY SINGLE_LIST_ENTRY #define _SLIST_ENTRY _SINGLE_LIST_ENTRY #define PSLIST_ENTRY PSINGLE_LIST_ENTRY + +#if defined(_WIN64) +typedef union DECLSPEC_ALIGN(16) _SLIST_HEADER { + struct { + ULONGLONG Alignment; + ULONGLONG Region; + } DUMMYSTRUCTNAME; + struct { + ULONGLONG Depth:16; + ULONGLONG Sequence:9; + ULONGLONG NextEntry:39; + ULONGLONG HeaderType:1; + ULONGLONG Init:1; + ULONGLONG Reserved:59; + ULONGLONG Region:3; + } Header8; + struct { + ULONGLONG Depth:16; + ULONGLONG Sequence:48; + ULONGLONG HeaderType:1; + ULONGLONG Init:1; + ULONGLONG Reserved:2; + ULONGLONG NextEntry:60; + } Header16; +} SLIST_HEADER, *PSLIST_HEADER; +#else typedef union _SLIST_HEADER { - ULONGLONG Alignment; - _ANONYMOUS_STRUCT struct { - SLIST_ENTRY Next; - WORD Depth; - WORD Sequence; - } DUMMYSTRUCTNAME; -} SLIST_HEADER,*PSLIST_HEADER; -#endif /* !_SLIST_HEADER_ */ + ULONGLONG Alignment; + struct { + SLIST_ENTRY Next; + USHORT Depth; + USHORT Sequence; + } DUMMYSTRUCTNAME; +} SLIST_HEADER, *PSLIST_HEADER; +#endif + +#endif /* _SLIST_HEADER_ */ + NTSYSAPI VOID