[edk2] [v2 2/4] EmulatorPkg/Mpservice: Remove addressof operator

Subject: [edk2] [v2 2/4] EmulatorPkg/Mpservice: Remove addressof operator

From: Chen Fan <chen.fan.fnst@cn.fujitsu.com>

To: <edk2-devel@lists.sourceforge.net>

Date: 2014-07-29 18:17:20

  • 2014-07-29 18:17:20  Chen Fan   [edk2] [v2 2/4] EmulatorPkg/Mpservice: Remove addressof operator
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan 
Reviewed-by: Jordan Justen 
---
 EmulatorPkg/CpuRuntimeDxe/MpService.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/EmulatorPkg/CpuRuntimeDxe/MpService.c b/EmulatorPkg/CpuRuntimeDxe/MpService.c
index 238ecc6..9ce23c0 100644
--- a/EmulatorPkg/CpuRuntimeDxe/MpService.c
+++ b/EmulatorPkg/CpuRuntimeDxe/MpService.c
@@ -440,9 +440,9 @@ CpuMpServicesStartupAllAps (
     if (ProcessorData->State == CPU_STATE_IDLE) {
       gMPSystem.StartCount++;
 
-      gThread->MutexLock (&ProcessorData->StateLock);
+      gThread->MutexLock (ProcessorData->StateLock);
       ProcessorData->State = APInitialState;
-      gThread->MutexUnlock (&ProcessorData->StateLock);
+      gThread->MutexUnlock (ProcessorData->StateLock);
 
       if (SingleThread) {
         APInitialState = CPU_STATE_BLOCKED;
@@ -512,9 +512,9 @@ CpuMpServicesStartupAllAps (
         if (SingleThread) {
           Status = GetNextBlockedNumber (&NextNumber);
           if (!EFI_ERROR (Status)) {
-            gThread->MutexLock (&gMPSystem.ProcessorData[NextNumber].StateLock);
+            gThread->MutexLock (gMPSystem.ProcessorData[NextNumber].StateLock);
             gMPSystem.ProcessorData[NextNumber].State = CPU_STATE_READY;
-            gThread->MutexUnlock (&gMPSystem.ProcessorData[NextNumber].StateLock);
+            gThread->MutexUnlock (gMPSystem.ProcessorData[NextNumber].StateLock);
           }
         }
 
@@ -699,14 +699,14 @@ CpuMpServicesStartupThisAP (
 
   // Blocking
   while (TRUE) {
-    gThread->MutexLock (&gMPSystem.ProcessorData[ProcessorNumber].StateLock);
+    gThread->MutexLock (gMPSystem.ProcessorData[ProcessorNumber].StateLock);
     if (gMPSystem.ProcessorData[ProcessorNumber].State == CPU_STATE_FINISHED) {
       gMPSystem.ProcessorData[ProcessorNumber].State = CPU_STATE_IDLE;
-      gThread->MutexUnlock (&gMPSystem.ProcessorData[ProcessorNumber].StateLock);
+      gThread->MutexUnlock (gMPSystem.ProcessorData[ProcessorNumber].StateLock);
       break;
     }
 
-    gThread->MutexUnlock (&gMPSystem.ProcessorData[ProcessorNumber].StateLock);
+    gThread->MutexUnlock (gMPSystem.ProcessorData[ProcessorNumber].StateLock);
 
     if ((TimeoutInMicroseconds != 0) && (Timeout < 0)) {
       return EFI_TIMEOUT;
@@ -865,7 +865,7 @@ CpuMpServicesEnableDisableAP (
     return EFI_UNSUPPORTED;
   }
 
-  gThread->MutexLock (&gMPSystem.ProcessorData[ProcessorNumber].StateLock);
+  gThread->MutexLock (gMPSystem.ProcessorData[ProcessorNumber].StateLock);
 
   if (EnableAP) {
     if ((gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag & PROCESSOR_ENABLED_BIT) == 0 ) {
@@ -884,7 +884,7 @@ CpuMpServicesEnableDisableAP (
     gMPSystem.ProcessorData[ProcessorNumber].Info.StatusFlag |= (*HealthFlag & PROCESSOR_HEALTH_STATUS_BIT);
   }
 
-  gThread->MutexUnlock (&gMPSystem.ProcessorData[ProcessorNumber].StateLock);
+  gThread->MutexUnlock (gMPSystem.ProcessorData[ProcessorNumber].StateLock);
 
   return EFI_SUCCESS;
 }
@@ -1015,9 +1015,9 @@ CpuCheckAllAPsStatus (
         if (!EFI_ERROR (Status)) {
           NextData = &gMPSystem.ProcessorData[NextNumber];
 
-          gThread->MutexLock (&NextData->StateLock);
+          gThread->MutexLock (NextData->StateLock);
           NextData->State = CPU_STATE_READY;
-          gThread->MutexUnlock (&NextData->StateLock);
+          gThread->MutexUnlock (NextData->StateLock);
 
           SetApProcedure (NextData, gMPSystem.Procedure, gMPSystem.ProcedureArgument);
         }
-- 
1.9.3


------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel