summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.c
diff options
context:
space:
mode:
authorMichael Kinney <michael.d.kinney@intel.com>2016-11-16 14:37:15 -0800
committerMichael Kinney <michael.d.kinney@intel.com>2016-11-17 17:08:19 -0800
commit4cee954ea8063ab2a911e418d8a9e7a179df212b (patch)
treef395e9d91aab3f27240832c53d81a66b6598dab8 /MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.c
parent7375f3f11a70e3c7295ef7005f6723ced176ad0a (diff)
downloadedk2-4cee954ea8063ab2a911e418d8a9e7a179df212b.tar.gz
edk2-4cee954ea8063ab2a911e418d8a9e7a179df212b.tar.bz2
edk2-4cee954ea8063ab2a911e418d8a9e7a179df212b.zip
MdePkg/BaseSynchronizationLib: Add volatile Interlocked*() APIs
The SpinLock functions in the SynchronicationLib use volatile parameters to keep compiler from optimizing these functions too much. The volatile keyword is missing from the Interlocked*() functions in this same library instance. Update the library instance to consistently use volatile on all functions in the SynchronizationLib class. Cc: Liming Gao <liming.gao@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Andrew Fish <afish@apple.com> Cc: Jeff Fan <jeff.fan@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.c')
-rw-r--r--MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.c b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.c
index 73af6ef91a..0bdbd791ec 100644
--- a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.c
+++ b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.c
@@ -1,7 +1,7 @@
/** @file
InterlockedCompareExchange64 function
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -34,7 +34,7 @@
UINT64
EFIAPI
InternalSyncCompareExchange64 (
- IN UINT64 *Value,
+ IN volatile UINT64 *Value,
IN UINT64 CompareValue,
IN UINT64 ExchangeValue
)