From patchwork Tue Mar 22 17:21:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 64194 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2196389lbc; Tue, 22 Mar 2016 10:21:27 -0700 (PDT) X-Received: by 10.98.33.208 with SMTP id o77mr56643431pfj.108.1458667285749; Tue, 22 Mar 2016 10:21:25 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id n62si26585735pfi.139.2016.03.22.10.21.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Mar 2016 10:21:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 30E3A1A1FF2; Tue, 22 Mar 2016 10:21:49 -0700 (PDT) X-Original-To: edk2-devel@ml01.01.org Delivered-To: edk2-devel@ml01.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2131A1A1FE2 for ; Tue, 22 Mar 2016 10:21:48 -0700 (PDT) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id C7A997F6B6; Tue, 22 Mar 2016 17:21:23 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-74.phx2.redhat.com [10.3.113.74]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2MHLCE3000739; Tue, 22 Mar 2016 13:21:22 -0400 From: Laszlo Ersek To: edk2-devel@ml01.01.org Date: Tue, 22 Mar 2016 18:21:06 +0100 Message-Id: <1458667268-23242-5-git-send-email-lersek@redhat.com> In-Reply-To: <1458667268-23242-1-git-send-email-lersek@redhat.com> References: <1458667268-23242-1-git-send-email-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Subject: [edk2] [PATCH 4/6] IntelFrameworkPkg/FrameworkUefiLib: implement EfiEventGroupSignal X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Michael D Kinney , Jordan Justen , Jeff Fan , Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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 --- Notes: build tested only IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c | 43 ++++++++++++++++++++ 1 file changed, 43 insertions(+) -- 1.8.3.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c index 9f73fb52eda6..e198b729a329 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.