MdePkg/BaseSynchronizationLib: Add volatile Interlocked*() APIs
authorMichael Kinney <michael.d.kinney@intel.com>
Wed, 16 Nov 2016 22:37:15 +0000 (14:37 -0800)
committerMichael Kinney <michael.d.kinney@intel.com>
Fri, 18 Nov 2016 01:08:19 +0000 (17:08 -0800)
commit4cee954ea8063ab2a911e418d8a9e7a179df212b
treef395e9d91aab3f27240832c53d81a66b6598dab8
parent7375f3f11a70e3c7295ef7005f6723ced176ad0a
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>
33 files changed:
MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange16.asm
MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange16.c
MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange16.nasm
MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange32.asm
MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange32.c
MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange32.nasm
MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.asm
MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.c
MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.nasm
MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedDecrement.asm
MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedDecrement.c
MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedDecrement.nasm
MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedIncrement.asm
MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedIncrement.c
MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedIncrement.nasm
MdePkg/Library/BaseSynchronizationLib/Synchronization.c
MdePkg/Library/BaseSynchronizationLib/SynchronizationGcc.c
MdePkg/Library/BaseSynchronizationLib/SynchronizationMsc.c
MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange16.asm
MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange16.c
MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange16.nasm
MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange32.asm
MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange32.c
MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange32.nasm
MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange64.asm
MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange64.c
MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange64.nasm
MdePkg/Library/BaseSynchronizationLib/X64/InterlockedDecrement.asm
MdePkg/Library/BaseSynchronizationLib/X64/InterlockedDecrement.c
MdePkg/Library/BaseSynchronizationLib/X64/InterlockedDecrement.nasm
MdePkg/Library/BaseSynchronizationLib/X64/InterlockedIncrement.asm
MdePkg/Library/BaseSynchronizationLib/X64/InterlockedIncrement.c
MdePkg/Library/BaseSynchronizationLib/X64/InterlockedIncrement.nasm