Revision: 16184
http://sourceforge.net/p/edk2/code/16184
Author: jljusten
Date: 2014-09-28 06:21:55 +0000 (Sun, 28 Sep 2014)
Log Message:
-----------
EmulatorPkg/MpService: use simple pointer access
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Modified Paths:
--------------
trunk/edk2/EmulatorPkg/CpuRuntimeDxe/MpService.c
Modified: trunk/edk2/EmulatorPkg/CpuRuntimeDxe/MpService.c
===================================================================
--- trunk/edk2/EmulatorPkg/CpuRuntimeDxe/MpService.c 2014-09-28 06:21:46 UTC
(rev 16183)
+++ trunk/edk2/EmulatorPkg/CpuRuntimeDxe/MpService.c 2014-09-28 06:21:55 UTC
(rev 16184)
@@ -1001,12 +1001,12 @@
// 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 @@
}
}
- 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 @@
}
// 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
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits