MdePkg/BaseSynchronizationLib: Add InterlockedCompareExchange16

This implements the function InterlockedCompareExchange16 () for all
architectures, using architecture and toolchain specific intrinsics
or primitive assembler instructions.

Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16966 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Ard Biesheuvel
2015-02-28 20:31:54 +00:00
committed by lersek
parent cc3104283f
commit 9b89163eea
17 changed files with 622 additions and 0 deletions

View File

@@ -32,12 +32,14 @@
[Sources.IA32]
Ia32/InterlockedCompareExchange64.c | MSFT
Ia32/InterlockedCompareExchange32.c | MSFT
Ia32/InterlockedCompareExchange16.c | MSFT
Ia32/InterlockedDecrement.c | MSFT
Ia32/InterlockedIncrement.c | MSFT
SynchronizationMsc.c | MSFT
Ia32/InterlockedCompareExchange64.asm | INTEL
Ia32/InterlockedCompareExchange32.asm | INTEL
Ia32/InterlockedCompareExchange16.asm | INTEL
Ia32/InterlockedDecrement.asm | INTEL
Ia32/InterlockedIncrement.asm | INTEL
Synchronization.c | INTEL
@@ -48,9 +50,11 @@
[Sources.X64]
X64/InterlockedCompareExchange64.c | MSFT
X64/InterlockedCompareExchange32.c | MSFT
X64/InterlockedCompareExchange16.c | MSFT
X64/InterlockedCompareExchange64.asm | INTEL
X64/InterlockedCompareExchange32.asm | INTEL
X64/InterlockedCompareExchange16.asm | INTEL
X64/InterlockedDecrement.c | MSFT
X64/InterlockedIncrement.c | MSFT
@@ -67,6 +71,7 @@
Ipf/Synchronization.c
Ipf/InterlockedCompareExchange64.s
Ipf/InterlockedCompareExchange32.s
Ipf/InterlockedCompareExchange16.s
Synchronization.c | INTEL
SynchronizationMsc.c | MSFT