summaryrefslogtreecommitdiffstats
path: root/EmulatorPkg
diff options
context:
space:
mode:
authorChen Fan <chen.fan.fnst@cn.fujitsu.com>2014-09-28 06:21:55 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2014-09-28 06:21:55 +0000
commit1a160a74a54002e7e49d391f19bbcf1142978a45 (patch)
tree869992dd86b5aed100ba25a595cf9719c228630a /EmulatorPkg
parent8ab6d73c0e240d573cdce317a15317f235d24ac4 (diff)
downloadedk2-1a160a74a54002e7e49d391f19bbcf1142978a45.tar.gz
edk2-1a160a74a54002e7e49d391f19bbcf1142978a45.tar.bz2
edk2-1a160a74a54002e7e49d391f19bbcf1142978a45.zip
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
Diffstat (limited to 'EmulatorPkg')
-rw-r--r--EmulatorPkg/CpuRuntimeDxe/MpService.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/EmulatorPkg/CpuRuntimeDxe/MpService.c b/EmulatorPkg/CpuRuntimeDxe/MpService.c
index ed57d7a0a3..866028b4c2 100644
--- a/EmulatorPkg/CpuRuntimeDxe/MpService.c
+++ b/EmulatorPkg/CpuRuntimeDxe/MpService.c
@@ -1001,12 +1001,12 @@ CpuCheckAllAPsStatus (
// context. Meaning deadlock. Which is a bad thing.
// So, try lock it. If we can get it, cool, do our thing.
// 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)) {
return;
}
- ProcessorState = gMPSystem.ProcessorData[ProcessorNumber].State;
- gThread->MutexUnlock (gMPSystem.ProcessorData[ProcessorNumber].StateLock);
+ ProcessorState = ProcessorData->State;
+ gThread->MutexUnlock (ProcessorData->StateLock);
switch (ProcessorState) {
case CPU_STATE_READY:
@@ -1027,9 +1027,9 @@ CpuCheckAllAPsStatus (
}
}
- gThread->MutexLock (gMPSystem.ProcessorData[ProcessorNumber].StateLock);
- gMPSystem.ProcessorData[ProcessorNumber].State = CPU_STATE_IDLE;
- gThread->MutexUnlock (gMPSystem.ProcessorData[ProcessorNumber].StateLock);
+ gThread->MutexLock (ProcessorData->StateLock);
+ ProcessorData->State = CPU_STATE_IDLE;
+ gThread->MutexUnlock (ProcessorData->StateLock);
gMPSystem.FinishCount++;
break;
@@ -1056,12 +1056,12 @@ CpuCheckAllAPsStatus (
}
// Mark the
- Status = gThread->MutexTryLock (gMPSystem.ProcessorData[ProcessorNumber].StateLock);
+ Status = gThread->MutexTryLock (ProcessorData->StateLock);
if (EFI_ERROR(Status)) {
return;
}
- ProcessorState = gMPSystem.ProcessorData[ProcessorNumber].State;
- gThread->MutexUnlock (gMPSystem.ProcessorData[ProcessorNumber].StateLock);
+ ProcessorState = ProcessorData->State;
+ gThread->MutexUnlock (ProcessorData->StateLock);
if (ProcessorState != CPU_STATE_IDLE) {
// If we are retrying make sure we don't double count