]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseSynchronizationLib/X64/InterlockedDecrement.c
MdePkg/BaseSynchronizationLib: Add volatile Interlocked*() APIs
[mirror_edk2.git] / MdePkg / Library / BaseSynchronizationLib / X64 / InterlockedDecrement.c
index 9e2e339aeeee5c91ca8a209177315300588f9401..da402cd4c67f792c17ed914722c552e8a240f892 100644 (file)
@@ -1,11 +1,11 @@
 /** @file\r
   InterlockedDecrement function\r
 \r
-  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
-  All rights reserved. This program and the accompanying materials\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
-  http://opensource.org/licenses/bsd-license.php\r
+  http://opensource.org/licenses/bsd-license.php.\r
 \r
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
@@ -38,9 +38,9 @@ long _InterlockedDecrement(
 UINT32\r
 EFIAPI\r
 InternalSyncDecrement (\r
-  IN      UINT32                    *Value\r
+  IN      volatile UINT32           *Value\r
   )\r
 {\r
-  return _InterlockedDecrement (Value);\r
+  return _InterlockedDecrement ((long *)(UINTN)(Value));\r
 }\r
 \r