From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 523A181DF1 for ; Mon, 16 Jan 2017 23:08:48 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP; 16 Jan 2017 23:08:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,243,1477983600"; d="scan'208";a="1083871622" Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.9.9]) by orsmga001.jf.intel.com with ESMTP; 16 Jan 2017 23:08:47 -0800 From: Star Zeng To: edk2-devel@lists.01.org Cc: Star Zeng , Liming Gao , Michael D Kinney , Jeff Fan Date: Tue, 17 Jan 2017 15:08:35 +0800 Message-Id: <1484636920-180432-3-git-send-email-star.zeng@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 In-Reply-To: <1484636920-180432-1-git-send-email-star.zeng@intel.com> References: <1484636920-180432-1-git-send-email-star.zeng@intel.com> Subject: [PATCH 2/7] IntelFrameworkPkg UefiLib: Make the event empty function public X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jan 2017 07:08:48 -0000 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298 Then this event empty function can be used to remove the duplication in drivers and other libraries. Cc: Liming Gao Cc: Michael D Kinney Cc: Jeff Fan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng --- .../Library/FrameworkUefiLib/UefiLib.c | 42 +++++++++++----------- .../Library/FrameworkUefiLib/UefiLibInternal.h | 20 +---------- .../Library/FrameworkUefiLib/UefiNotTiano.c | 4 +-- 3 files changed, 23 insertions(+), 43 deletions(-) diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c index e198b729a329..30b6dc921828 100644 --- a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c +++ b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c @@ -5,7 +5,7 @@ EFI Driver Model related protocols, manage Unicode string tables for UEFI Drivers, and print messages on the console output and standard error devices. - Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -310,7 +310,7 @@ EfiEventGroupSignal ( Status = gBS->CreateEventEx ( EVT_NOTIFY_SIGNAL, TPL_CALLBACK, - InternalEmptyFunction, + EfiEventEmptyFunction, NULL, EventGroup, &Event @@ -325,6 +325,24 @@ EfiEventGroupSignal ( return Status; } +/** + An empty function that can be used as NotifyFunction parameter of + CreateEvent() or CreateEventEx(). + + @param Event Event whose notification function is being invoked. + @param Context The pointer to the notification function's context, + which is implementation-dependent. + +**/ +VOID +EFIAPI +EfiEventEmptyFunction ( + IN EFI_EVENT Event, + IN VOID *Context + ) +{ +} + /** Returns the current TPL. @@ -1457,23 +1475,3 @@ GetBestLanguage ( // return NULL; } - -/** - An empty function to pass error checking of CreateEventEx (). - - This empty function ensures that EVT_NOTIFY_SIGNAL_ALL is error - checked correctly since it is now mapped into CreateEventEx() in UEFI 2.0. - - @param Event Event whose notification function is being invoked. - @param Context Pointer to the notification function's context, - which is implementation-dependent. - -**/ -VOID -EFIAPI -InternalEmptyFunction ( - IN EFI_EVENT Event, - IN VOID *Context - ) -{ -} diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibInternal.h b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibInternal.h index 16c663626db2..51f58176defa 100644 --- a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibInternal.h +++ b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibInternal.h @@ -1,7 +1,7 @@ /** @file Internal include file for UefiLib. - Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.
+ Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -41,22 +41,4 @@ #include #include -/** - An empty function to pass error checking of CreateEventEx (). - - This empty function ensures that EVT_NOTIFY_SIGNAL_ALL is error - checked correctly since it is now mapped into CreateEventEx() in UEFI 2.0. - - @param Event Event whose notification function is being invoked. - @param Context Pointer to the notification function's context, - which is implementation-dependent. - -**/ -VOID -EFIAPI -InternalEmptyFunction ( - IN EFI_EVENT Event, - IN VOID *Context - ); - #endif diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiNotTiano.c b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiNotTiano.c index 1221403672f9..e641aba647bb 100644 --- a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiNotTiano.c +++ b/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiNotTiano.c @@ -45,7 +45,7 @@ EfiCreateEventLegacyBoot ( { return EfiCreateEventLegacyBootEx ( TPL_CALLBACK, - InternalEmptyFunction, + EfiEventEmptyFunction, NULL, LegacyBootEvent ); @@ -135,7 +135,7 @@ EfiCreateEventReadyToBoot ( { return EfiCreateEventReadyToBootEx ( TPL_CALLBACK, - InternalEmptyFunction, + EfiEventEmptyFunction, NULL, ReadyToBootEvent ); -- 2.7.0.windows.1