diff options
author | yshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-07-08 09:38:43 +0000 |
---|---|---|
committer | yshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-07-08 09:38:43 +0000 |
commit | 38bbd3d91c38481d18c1a7e2049473c951ee98ed (patch) | |
tree | ae4da246ac9d5b8501d017de66aecf1c7c8bb8b4 /MdePkg/Library/BaseLib/Synchronization.c | |
parent | d74eeda8a7ed223d49e59378f33b2bcfb1bb73b1 (diff) | |
download | edk2-platforms-38bbd3d91c38481d18c1a7e2049473c951ee98ed.tar.xz |
Code scrub:
MdePkg/Library/BaseCacheMaintenanceLib
MdePkg/Library/BaseDebugLibNull
MdePkg/Library/BaseIoLibIntrinsic
MdePkg/Library/BaseLib
MdePkg/Library/BaseMemoryLib
MdePkg/Library/BaseMemoryLibMmx
MdePkg/Library/BaseMemoryLibOptDxe
MdePkg/Library/BaseMemoryLibOptPei
MdePkg/Library/BaseMemoryLibRepStr
MdePkg/Library/BaseMemoryLibSse2
MdePkg/Library/BasePeCoffGetEntryPointLib
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5426 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BaseLib/Synchronization.c')
-rw-r--r-- | MdePkg/Library/BaseLib/Synchronization.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/MdePkg/Library/BaseLib/Synchronization.c b/MdePkg/Library/BaseLib/Synchronization.c index f1565db3fd..8e8a2bf7e1 100644 --- a/MdePkg/Library/BaseLib/Synchronization.c +++ b/MdePkg/Library/BaseLib/Synchronization.c @@ -44,7 +44,6 @@ GetSpinLockProperties ( VOID
)
{
- // @bug May use a PCD entry to determine this alignment.
return 32;
}
@@ -61,7 +60,7 @@ GetSpinLockProperties ( @param SpinLock A pointer to the spin lock to initialize to the released
state.
- @return SpinLock
+ @return SpinLock initialized in release state.
**/
SPIN_LOCK *
@@ -92,7 +91,7 @@ InitializeSpinLock ( @param SpinLock A pointer to the spin lock to place in the acquired state.
- @return SpinLock
+ @return SpinLock aquired lock.
**/
SPIN_LOCK *
@@ -190,7 +189,7 @@ AcquireSpinLockOrFail ( ASSERT (SpinLock != NULL);
LockValue = *SpinLock;
- ASSERT (LockValue == SPIN_LOCK_ACQUIRED || LockValue == SPIN_LOCK_RELEASED);
+ ASSERT (SPIN_LOCK_ACQUIRED == LockValue || SPIN_LOCK_RELEASED == LockValue);
return (BOOLEAN)(
InterlockedCompareExchangePointer (
@@ -226,7 +225,7 @@ ReleaseSpinLock ( ASSERT (SpinLock != NULL);
LockValue = *SpinLock;
- ASSERT (LockValue == SPIN_LOCK_ACQUIRED || LockValue == SPIN_LOCK_RELEASED);
+ ASSERT (SPIN_LOCK_ACQUIRED == LockValue || SPIN_LOCK_RELEASED == LockValue);
*SpinLock = SPIN_LOCK_RELEASED;
return SpinLock;
@@ -358,6 +357,8 @@ InterlockedCompareExchange64 ( operation.
@param CompareValue Pointer value used in compare operation.
@param ExchangeValue Pointer value used in exchange operation.
+
+ @return The original *Value before exchange.
**/
VOID *
|