summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLibInternals.h
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLibInternals.h')
-rw-r--r--MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLibInternals.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLibInternals.h b/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLibInternals.h
index e42824c..76f7023 100644
--- a/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLibInternals.h
+++ b/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLibInternals.h
@@ -63,6 +63,32 @@ InternalSyncDecrement (
/**
+ Performs an atomic compare exchange operation on a 16-bit unsigned integer.
+
+ Performs an atomic compare exchange operation on the 16-bit unsigned integer
+ specified by Value. If Value is equal to CompareValue, then Value is set to
+ ExchangeValue and CompareValue is returned. If Value is not equal to CompareValue,
+ then Value is returned. The compare exchange operation must be performed using
+ MP safe mechanisms.
+
+ @param Value A pointer to the 16-bit value for the compare exchange
+ operation.
+ @param CompareValue A 16-bit value used in compare operation.
+ @param ExchangeValue A 16-bit value used in exchange operation.
+
+ @return The original *Value before exchange.
+
+**/
+UINT16
+EFIAPI
+InternalSyncCompareExchange16 (
+ IN volatile UINT16 *Value,
+ IN UINT16 CompareValue,
+ IN UINT16 ExchangeValue
+ );
+
+
+/**
Performs an atomic compare exchange operation on a 32-bit unsigned integer.
Performs an atomic compare exchange operation on the 32-bit unsigned integer