From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 D5A6581E9C for ; Thu, 19 Jan 2017 20:42:36 -0800 (PST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jan 2017 20:42:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,257,1477983600"; d="scan'208";a="924642837" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga003.jf.intel.com with ESMTP; 19 Jan 2017 20:42:36 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 19 Jan 2017 20:42:36 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 19 Jan 2017 20:42:35 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.177]) with mapi id 14.03.0248.002; Fri, 20 Jan 2017 12:42:33 +0800 From: "Fan, Jeff" To: "Zeng, Star" , "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Kinney, Michael D" Thread-Topic: [PATCH 2/7] IntelFrameworkPkg UefiLib: Make the event empty function public Thread-Index: AQHScJCZR5Skx3TlwE65noqQYnUYlKFAzgNQ Date: Fri, 20 Jan 2017 04:42:32 +0000 Message-ID: <542CF652F8836A4AB8DBFAAD40ED192A4C520342@shsmsx102.ccr.corp.intel.com> References: <1484636920-180432-1-git-send-email-star.zeng@intel.com> <1484636920-180432-3-git-send-email-star.zeng@intel.com> In-Reply-To: <1484636920-180432-3-git-send-email-star.zeng@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTU0MzQwOGYtYmEwZi00ZWJhLWE0ZmUtZDJiZjc3ZGE2NGJjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IjJ0RHptS213YytJVkJ0XC9rTk1IMDhiZVYxc2VNeDRcLys4SGdVcnNVRDBRdz0ifQ== x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [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: Fri, 20 Jan 2017 04:42:37 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jeff Fan -----Original Message----- From: Zeng, Star=20 Sent: Tuesday, January 17, 2017 3:09 PM To: edk2-devel@lists.01.org Cc: Zeng, Star; Gao, Liming; Kinney, Michael D; Fan, Jeff Subject: [PATCH 2/7] IntelFrameworkPkg UefiLib: Make the event empty functi= on public REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D298 Then this event empty function can be used to remove the duplication in dri= vers 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/IntelFr= ameworkPkg/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 UEF= I Drivers,=20 and print messages on the console output and standard error devices. =20 - Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2017, Intel Corporation. All rights=20 + reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the license may b= e found at @@ -310,7 +310,7 @@ EfiEventGroupSignal ( Status =3D gBS->CreateEventEx ( EVT_NOTIFY_SIGNAL, TPL_CALLBACK, - InternalEmptyFunction, + EfiEventEmptyFunction, NULL, EventGroup, &Event @@ -325,6 +325,24 @@ EfiEventGroupSignal ( return Status; } =20 +/** + An empty function that can be used as NotifyFunction parameter of + CreateEvent() or CreateEventEx(). + + @param Event Event whose notification function is being inv= oked. + @param Context The pointer to the notification function's con= text, + which is implementation-dependent. + +**/ +VOID +EFIAPI +EfiEventEmptyFunction ( + IN EFI_EVENT Event, + IN VOID *Context + ) +{ +} + /**=20 Returns the current TPL. =20 @@ -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 con= text, - 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. =20 - Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.
+ Copyright (c) 2007 - 2017, Intel Corporation. All rights=20 + reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the B= SD License which accompanies this distribution. The full text of the license may b= e found at @@ -41,22 +41,4 @@ #include #include =20 -/** - 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 con= text, - which is implementation-dependent. - -**/ -VOID -EFIAPI -InternalEmptyFunction ( - IN EFI_EVENT Event, - IN VOID *Context - ); - #endif diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiNotTiano.c b/In= telFrameworkPkg/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