ntdll: Add prototypes to winnt.h for the SList functions.
Francois Gouget
fgouget at free.fr
Fri Feb 9 05:34:37 CST 2007
Fix the implementation to match the official prototypes.
---
I've had trouble with the placement of 'volatile' in 'const
SLIST_HEADER* volatile'. I think putting 'volatile' last is correct
because it applies to the pointer, not to the pointed-to data like
'const'.
dlls/ntdll/rtl.c | 4 ++--
include/winnt.h | 8 ++++++++
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c
index 828b4a4..c7eafe5 100644
--- a/dlls/ntdll/rtl.c
+++ b/dlls/ntdll/rtl.c
@@ -937,7 +937,7 @@ VOID WINAPI RtlInitializeSListHead(volatile PSLIST_HEADER ListHeader)
#endif
}
-USHORT WINAPI RtlQueryDepthSList(volatile PSLIST_HEADER ListHeader)
+WORD WINAPI RtlQueryDepthSList(volatile PSLIST_HEADER ListHeader)
{
TRACE("(%p)\n", ListHeader);
#ifdef _WIN64
@@ -948,7 +948,7 @@ USHORT WINAPI RtlQueryDepthSList(volatile PSLIST_HEADER ListHeader)
#endif
}
-PSLIST_ENTRY WINAPI RtlFirstEntrySList(volatile PSLIST_HEADER ListHeader)
+PSLIST_ENTRY WINAPI RtlFirstEntrySList(const SLIST_HEADER* volatile ListHeader)
{
TRACE("(%p)\n", ListHeader);
#ifdef _WIN64
diff --git a/include/winnt.h b/include/winnt.h
index ff896c9..7536d8e 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -647,6 +647,14 @@ typedef union _SLIST_HEADER {
#endif
+PSLIST_ENTRY WINAPI RtlFirstEntrySList(const SLIST_HEADER*);
+VOID WINAPI RtlInitializeSListHead(PSLIST_HEADER);
+PSLIST_ENTRY WINAPI RtlInterlockedFlushSList(PSLIST_HEADER);
+PSLIST_ENTRY WINAPI RtlInterlockedPopEntrySList(PSLIST_HEADER);
+PSLIST_ENTRY WINAPI RtlInterlockedPushEntrySList(PSLIST_HEADER, PSLIST_ENTRY);
+WORD WINAPI RtlQueryDepthSList(PSLIST_HEADER);
+
+
/* Heap flags */
#define HEAP_NO_SERIALIZE 0x00000001
--
1.4.4.3
More information about the wine-patches
mailing list