X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FLibrary%2FUefiLib%2FUefiLib.c;h=96d375fb6f2e08f5adb8778dc0fd2658928da15e;hb=772fb7cb13de5e18f04e8a19b97d2949f9dc7054;hp=ba3acc1af228e55a16b85c657fa58a4c2b27d6ef;hpb=ca8f50e88e03f05df6cea0b2ed7a100c08a900b8;p=mirror_edk2.git diff --git a/MdePkg/Library/UefiLib/UefiLib.c b/MdePkg/Library/UefiLib/UefiLib.c index ba3acc1af2..96d375fb6f 100644 --- a/MdePkg/Library/UefiLib/UefiLib.c +++ b/MdePkg/Library/UefiLib/UefiLib.c @@ -304,6 +304,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.