]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/X64/InterlockedCompareExchange64.c
Update copyright for files modified in this year
[mirror_edk2.git] / MdePkg / Library / BaseLib / X64 / InterlockedCompareExchange64.c
index bed1dc8972271275ebbf24ce9ea1dc27b2b5ffed..0a88eda2eaf049b4331dc281f6c298b04caa20fa 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   InterlockedCompareExchange64 function\r
 \r
-  Copyright (c) 2006 - 2007, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 \r
 **/\r
 \r
-//\r
-// Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics\r
-//\r
+/**\r
+  Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics.\r
+**/\r
+\r
 __int64 _InterlockedCompareExchange64(\r
    __int64 volatile * Destination,\r
    __int64 Exchange,\r
@@ -23,6 +24,22 @@ __int64 _InterlockedCompareExchange64(
 \r
 #pragma intrinsic(_InterlockedCompareExchange64)\r
 \r
+/**\r
+  Performs an atomic compare exchange operation on a 64-bit unsigned integer.\r
+\r
+  Performs an atomic compare exchange operation on the 64-bit unsigned integer specified\r
+  by Value.  If Value is equal to CompareValue, then Value is set to ExchangeValue and\r
+  CompareValue is returned.  If Value is not equal to CompareValue, then Value is returned.\r
+  The compare exchange operation must be performed using MP safe mechanisms.\r
+\r
+  @param  Value         A pointer to the 64-bit value for the compare exchange\r
+                        operation.\r
+  @param  CompareValue  64-bit value used in compare operation.\r
+  @param  ExchangeValue 64-bit value used in exchange operation.\r
+\r
+  @return The original *Value before exchange.\r
+\r
+**/\r
 UINT64\r
 EFIAPI\r
 InternalSyncCompareExchange64 (\r