From 6212b9481d822a6765f8cd264ceb8454291948bd Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Tue, 22 Mar 2016 17:07:14 +0100 Subject: [PATCH] IntelFrameworkPkg/FrameworkUefiLib: implement EfiEventGroupSignal This patch follows the implementation seen in MdePkg's UefiLib instance, so that FrameworkUefiLib also covers the UefiLib.h library class header completely. Cc: Michael D Kinney Cc: Jeff Fan Cc: Jordan Justen Cc: Ard Biesheuvel Suggested-by: Jordan Justen Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Jordan Justen Reviewed-by: Liming Gao --- .../Library/FrameworkUefiLib/UefiLib.c | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c index 9f73fb52ed..e198b729a3 100644 --- a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c +++ b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c @@ -282,6 +282,49 @@ EfiNamedEventSignal ( return Status; } +/** + Signals an event group by placing a new event in the group temporarily and + signaling it. + + @param[in] EventGroup Supplies the unique identifier of the event + group to signal. + + @retval EFI_SUCCESS The event group was signaled successfully. + @retval EFI_INVALID_PARAMETER EventGroup is NULL. + @return Error codes that report problems about event + creation or signaling. +**/ +EFI_STATUS +EFIAPI +EfiEventGroupSignal ( + IN CONST EFI_GUID *EventGroup + ) +{ + EFI_STATUS Status; + EFI_EVENT Event; + + if (EventGroup == NULL) { + return EFI_INVALID_PARAMETER; + } + + Status = gBS->CreateEventEx ( + EVT_NOTIFY_SIGNAL, + TPL_CALLBACK, + InternalEmptyFunction, + NULL, + EventGroup, + &Event + ); + if (EFI_ERROR (Status)) { + return Status; + } + + Status = gBS->SignalEvent (Event); + gBS->CloseEvent (Event); + + return Status; +} + /** Returns the current TPL. -- 2.39.2