- Implement RtlPrefectMemoryNonTemporal. Patch by Patrick Baggett <baggett.patrick...
[reactos.git] / reactos / lib / rtl / mem.c
index 6b9ace3..52c54e1 100644 (file)
@@ -1,25 +1,20 @@
-
-/* $Id$
- * 
- * COPYRIGHT:       See COPYING in the top level directory
- * PROJECT:         ReactOS kernel
+/* COPYRIGHT:       See COPYING in the top level directory
+ * PROJECT:         ReactOS system libraries
  * FILE:            lib/rtl/mem.c
  * PURPOSE:         Memory functions
  * PROGRAMMER:      David Welch (welch@mcmail.com)
- * UPDATE HISTORY:
- *                  Created 22/05/98
  */
 
 /* INCLUDES *****************************************************************/
 
-#include <ddk/ntddk.h>
-#include <string.h>
+#include <rtl.h>
 
 #define NDEBUG
 #include <debug.h>
 
-
-
+#undef RtlUlonglongByteSwap
+#undef RtlUlongByteSwap
+#undef RtlUshortByteSwap
 
 /* FUNCTIONS *****************************************************************/
 
@@ -39,7 +34,7 @@
  *
  * @implemented
  */
-SIZE_T STDCALL
+SIZE_T NTAPI
 RtlCompareMemory(IN const VOID *Source1,
                  IN const VOID *Source2,
                  IN SIZE_T Length)
@@ -55,7 +50,7 @@ RtlCompareMemory(IN const VOID *Source1,
  * @implemented
  */
 ULONG
-STDCALL
+NTAPI
 RtlCompareMemoryUlong (
    PVOID Source,
    ULONG Length,
@@ -85,11 +80,12 @@ RtlCompareMemoryUlong (
 }
 
 
+#undef RtlFillMemory
 /*
  * @implemented
  */
 VOID
-STDCALL
+NTAPI
 RtlFillMemory (
    PVOID Destination,
    ULONG Length,
@@ -105,7 +101,7 @@ RtlFillMemory (
  * @implemented
  */
 VOID
-STDCALL
+NTAPI
 RtlFillMemoryUlong (
    PVOID Destination,
    ULONG Length,
@@ -124,12 +120,12 @@ RtlFillMemoryUlong (
 }
 
 
-
+#undef RtlMoveMemory
 /*
  * @implemented
  */
 VOID
-STDCALL
+NTAPI
 RtlMoveMemory (
    PVOID    Destination,
    CONST VOID  * Source,
@@ -144,7 +140,7 @@ RtlMoveMemory (
 }
 
 /*
-* @unimplemented
+* @implemented
 */
 VOID
 FASTCALL
@@ -153,14 +149,18 @@ RtlPrefetchMemoryNonTemporal(
        IN SIZE_T Length
        )
 {
-       UNIMPLEMENTED;
+       /* By nature of prefetch, this is non-portable. */
+       (void)Source;
+       (void)Length;
 }
 
+
+#undef RtlZeroMemory
 /*
  * @implemented
  */
 VOID
-STDCALL
+NTAPI
 RtlZeroMemory (
    PVOID Destination,
    ULONG Length