To decrease the count of RunningApCount, InterlockedDecrement is enough to achieve that.
This patch is to simplify RunningApCount decrement. Cc: Laszlo Ersek <[email protected]> Cc: Eric Dong <[email protected]> Cc: Ray Ni <[email protected]> Cc: Zeng Star <[email protected]> Cc: Gerd Hoffmann <[email protected]> Cc: Rahul Kumar <[email protected]> Signed-off-by: Jiaxin Wu <[email protected]> --- UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c index 54542262a2..9b477b6695 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c @@ -1450,11 +1450,11 @@ InternalSmmStartupAllAPs ( // // Decrease the count to mark this processor(AP or BSP) as finished. // if (ProcToken != NULL) { - WaitForSemaphore (&ProcToken->RunningApCount); + InterlockedDecrement (&ProcToken->RunningApCount); } } } ReleaseAllAPs (); -- 2.16.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112599): https://edk2.groups.io/g/devel/message/112599 Mute This Topic: https://groups.io/mt/103187897/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
