mirror of https://github.com/acidanthera/audk.git
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1931 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
d73991a143
commit
c9708dddc1
|
@ -236,8 +236,13 @@ AcquireSpinLockOrFail (
|
|||
IN OUT SPIN_LOCK *SpinLock
|
||||
)
|
||||
{
|
||||
SPIN_LOCK LockValue;
|
||||
|
||||
ASSERT (SpinLock != NULL);
|
||||
ASSERT (*SpinLock == SPIN_LOCK_ACQUIRED || *SpinLock == SPIN_LOCK_RELEASED);
|
||||
|
||||
LockValue = *SpinLock;
|
||||
ASSERT (LockValue == SPIN_LOCK_ACQUIRED || LockValue == SPIN_LOCK_RELEASED);
|
||||
|
||||
return (BOOLEAN)(
|
||||
InterlockedCompareExchangePointer (
|
||||
(VOID**)SpinLock,
|
||||
|
@ -267,8 +272,13 @@ ReleaseSpinLock (
|
|||
IN OUT SPIN_LOCK *SpinLock
|
||||
)
|
||||
{
|
||||
SPIN_LOCK LockValue;
|
||||
|
||||
ASSERT (SpinLock != NULL);
|
||||
ASSERT (*SpinLock == SPIN_LOCK_ACQUIRED || *SpinLock == SPIN_LOCK_RELEASED);
|
||||
|
||||
LockValue = *SpinLock;
|
||||
ASSERT (LockValue == SPIN_LOCK_ACQUIRED || LockValue == SPIN_LOCK_RELEASED);
|
||||
|
||||
*SpinLock = SPIN_LOCK_RELEASED;
|
||||
return SpinLock;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue