]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseSynchronizationLib/X64/InterlockedIncrement.c
MdePkg/BaseSynchronizationLib: Add volatile Interlocked*() APIs
[mirror_edk2.git] / MdePkg / Library / BaseSynchronizationLib / X64 / InterlockedIncrement.c
index c0deb60c54fb2e4f5e841950a216947511fb5161..bbd1384602f146da1ad361ac539890cd7b172671 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   InterLockedIncrement function\r
 \r
-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
   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
@@ -38,9 +38,9 @@ long _InterlockedIncrement(
 UINT32\r
 EFIAPI\r
 InternalSyncIncrement (\r
-  IN      UINT32                    *Value\r
+  IN      volatile UINT32           *Value\r
   )\r
 {\r
-  return _InterlockedIncrement (Value);\r
+  return _InterlockedIncrement ((long *)(UINTN)(Value));\r
 }\r
 \r