mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-30 17:14:07 +02:00
EmulatorPkg/MpService: use simple pointer access
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16184 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
8ab6d73c0e
commit
1a160a74a5
@ -1001,12 +1001,12 @@ CpuCheckAllAPsStatus (
|
|||||||
// context. Meaning deadlock. Which is a bad thing.
|
// context. Meaning deadlock. Which is a bad thing.
|
||||||
// So, try lock it. If we can get it, cool, do our thing.
|
// So, try lock it. If we can get it, cool, do our thing.
|
||||||
// otherwise, just dump out & try again on the next iteration.
|
// otherwise, just dump out & try again on the next iteration.
|
||||||
Status = gThread->MutexTryLock (gMPSystem.ProcessorData[ProcessorNumber].StateLock);
|
Status = gThread->MutexTryLock (ProcessorData->StateLock);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ProcessorState = gMPSystem.ProcessorData[ProcessorNumber].State;
|
ProcessorState = ProcessorData->State;
|
||||||
gThread->MutexUnlock (gMPSystem.ProcessorData[ProcessorNumber].StateLock);
|
gThread->MutexUnlock (ProcessorData->StateLock);
|
||||||
|
|
||||||
switch (ProcessorState) {
|
switch (ProcessorState) {
|
||||||
case CPU_STATE_READY:
|
case CPU_STATE_READY:
|
||||||
@ -1027,9 +1027,9 @@ CpuCheckAllAPsStatus (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gThread->MutexLock (gMPSystem.ProcessorData[ProcessorNumber].StateLock);
|
gThread->MutexLock (ProcessorData->StateLock);
|
||||||
gMPSystem.ProcessorData[ProcessorNumber].State = CPU_STATE_IDLE;
|
ProcessorData->State = CPU_STATE_IDLE;
|
||||||
gThread->MutexUnlock (gMPSystem.ProcessorData[ProcessorNumber].StateLock);
|
gThread->MutexUnlock (ProcessorData->StateLock);
|
||||||
gMPSystem.FinishCount++;
|
gMPSystem.FinishCount++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1056,12 +1056,12 @@ CpuCheckAllAPsStatus (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Mark the
|
// Mark the
|
||||||
Status = gThread->MutexTryLock (gMPSystem.ProcessorData[ProcessorNumber].StateLock);
|
Status = gThread->MutexTryLock (ProcessorData->StateLock);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ProcessorState = gMPSystem.ProcessorData[ProcessorNumber].State;
|
ProcessorState = ProcessorData->State;
|
||||||
gThread->MutexUnlock (gMPSystem.ProcessorData[ProcessorNumber].StateLock);
|
gThread->MutexUnlock (ProcessorData->StateLock);
|
||||||
|
|
||||||
if (ProcessorState != CPU_STATE_IDLE) {
|
if (ProcessorState != CPU_STATE_IDLE) {
|
||||||
// If we are retrying make sure we don't double count
|
// If we are retrying make sure we don't double count
|
||||||
|
Loading…
x
Reference in New Issue
Block a user