]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg UefiLib: Make the event empty function public
authorStar Zeng <star.zeng@intel.com>
Tue, 17 Jan 2017 05:26:18 +0000 (13:26 +0800)
committerStar Zeng <star.zeng@intel.com>
Fri, 20 Jan 2017 07:51:16 +0000 (15:51 +0800)
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 <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdePkg/Include/Library/UefiLib.h
MdePkg/Library/UefiLib/UefiLib.c
MdePkg/Library/UefiLib/UefiLibInternal.h
MdePkg/Library/UefiLib/UefiNotTiano.c

index e8a6b8498e65c49829c25e934ec3b4194f74254e..0b14792a0a7fa98ec3604ba102b46972e3b8310f 100644 (file)
@@ -12,7 +12,7 @@
   of size reduction when compiler optimization is disabled. If MDEPKG_NDEBUG is\r
   defined, then debug and assert related macros wrapped by it are the NULL implementations.\r
 \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under \r
 the terms and conditions of the BSD License that accompanies this distribution.  \r
 The full text of the license may be found at\r
@@ -241,6 +241,22 @@ EfiEventGroupSignal (
   IN CONST EFI_GUID *EventGroup\r
   );\r
 \r
+/**\r
+  An empty function that can be used as NotifyFunction parameter of\r
+  CreateEvent() or CreateEventEx().\r
+\r
+  @param Event              Event whose notification function is being invoked.\r
+  @param Context            The pointer to the notification function's context,\r
+                            which is implementation-dependent.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+EfiEventEmptyFunction (\r
+  IN EFI_EVENT              Event,\r
+  IN VOID                   *Context\r
+  );\r
+\r
 /** \r
   Returns the current TPL.\r
 \r
index 96d375fb6f2e08f5adb8778dc0fd2658928da15e..a7eee01240c1cfe1203d19f14a1e96767843a238 100644 (file)
@@ -5,7 +5,7 @@
   EFI Driver Model related protocols, manage Unicode string tables for UEFI Drivers, \r
   and print messages on the console output and standard error devices.\r
 \r
-  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -332,7 +332,7 @@ EfiEventGroupSignal (
   Status = gBS->CreateEventEx (\r
                   EVT_NOTIFY_SIGNAL,\r
                   TPL_CALLBACK,\r
-                  InternalEmptyFunction,\r
+                  EfiEventEmptyFunction,\r
                   NULL,\r
                   EventGroup,\r
                   &Event\r
@@ -347,6 +347,24 @@ EfiEventGroupSignal (
   return Status;\r
 }\r
 \r
+/**\r
+  An empty function that can be used as NotifyFunction parameter of\r
+  CreateEvent() or CreateEventEx().\r
+\r
+  @param Event              Event whose notification function is being invoked.\r
+  @param Context            The pointer to the notification function's context,\r
+                            which is implementation-dependent.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+EfiEventEmptyFunction (\r
+  IN EFI_EVENT              Event,\r
+  IN VOID                   *Context\r
+  )\r
+{\r
+}\r
+\r
 /** \r
   Returns the current TPL.\r
 \r
@@ -1587,23 +1605,3 @@ GetBestLanguage (
   //\r
   return NULL;\r
 }\r
-\r
-/**\r
-  An empty function to pass error checking of CreateEventEx ().\r
-\r
-  This empty function ensures that EVT_NOTIFY_SIGNAL_ALL is error\r
-  checked correctly since it is now mapped into CreateEventEx() in UEFI 2.0.\r
-\r
-  @param  Event                 Event whose notification function is being invoked.\r
-  @param  Context               The pointer to the notification function's context,\r
-                                which is implementation-dependent.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-InternalEmptyFunction (\r
-  IN EFI_EVENT                Event,\r
-  IN VOID                     *Context\r
-  )\r
-{\r
-}\r
index 2311f27f1e6dd37f407932a3343bae335e8a27e5..412ad1b89c9d12c79d5fc5f6d3586391914afa92 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Internal include file for UefiLib.\r
 \r
-  Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
    This program and the accompanying materials\r
    are licensed and made available under the terms and conditions of the BSD License\r
    which accompanies this distribution. The full text of the license may be found at\r
 #include <Library/PrintLib.h>\r
 #include <Library/DevicePathLib.h>\r
 \r
-/**\r
-  An empty function to pass error checking of CreateEventEx ().\r
-\r
-  This empty function ensures that EVT_NOTIFY_SIGNAL_ALL is error\r
-  checked correctly since it is now mapped into CreateEventEx() in UEFI 2.0.\r
-\r
-  @param  Event                 Event whose notification function is being invoked.\r
-  @param  Context               The pointer to the notification function's context,\r
-                                which is implementation-dependent.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-InternalEmptyFunction (\r
-  IN EFI_EVENT                Event,\r
-  IN VOID                     *Context\r
-  );\r
-\r
 #endif\r
index 46fa737c0fd3a048d7659b68f9f52b5523cca671..fc3a6ea74a0e44e6b5015b08e5e23391fac12894 100644 (file)
@@ -6,7 +6,7 @@
   (EDK/EFI 1.10) and new (EDK II/UEFI 2.0) way. This module is a DXE driver as\r
   it contains DXE enum extensions for EFI event services.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -46,7 +46,7 @@ EfiCreateEventLegacyBoot (
 {\r
   return EfiCreateEventLegacyBootEx (\r
            TPL_CALLBACK,\r
-           InternalEmptyFunction,\r
+           EfiEventEmptyFunction,\r
            NULL,\r
            LegacyBootEvent\r
            );\r
@@ -99,7 +99,7 @@ EfiCreateEventLegacyBootEx (
       // CreateEventEx will check NotifyFunction is NULL or not and return error.\r
       // Use dummy routine for the case NotifyFunction is NULL.\r
       //\r
-      WorkerNotifyFunction = InternalEmptyFunction;\r
+      WorkerNotifyFunction = EfiEventEmptyFunction;\r
     } else {\r
       WorkerNotifyFunction = NotifyFunction;\r
     }\r
@@ -141,7 +141,7 @@ EfiCreateEventReadyToBoot (
 {\r
   return EfiCreateEventReadyToBootEx (\r
            TPL_CALLBACK,\r
-           InternalEmptyFunction,\r
+           EfiEventEmptyFunction,\r
            NULL,\r
            ReadyToBootEvent\r
            );\r
@@ -194,7 +194,7 @@ EfiCreateEventReadyToBootEx (
       // CreateEventEx will check NotifyFunction is NULL or not and return error.\r
       // Use dummy routine for the case NotifyFunction is NULL.\r
       //\r
-      WorkerNotifyFunction = InternalEmptyFunction;\r
+      WorkerNotifyFunction = EfiEventEmptyFunction;\r
     } else {\r
       WorkerNotifyFunction = NotifyFunction;\r
     }\r