**/\r
VOID\r
EFIAPI\r
-InternalEmptyFuntion (\r
+InternalEmptyFunction (\r
IN EFI_EVENT Event,\r
IN VOID *Context\r
)\r
{\r
return EfiCreateEventLegacyBootEx (\r
TPL_CALLBACK,\r
- InternalEmptyFuntion,\r
+ InternalEmptyFunction,\r
NULL,\r
LegacyBootEvent\r
);\r
OUT EFI_EVENT *LegacyBootEvent\r
)\r
{\r
- EFI_STATUS Status;\r
+ EFI_STATUS Status;\r
+ EFI_EVENT_NOTIFY WorkerNotifyFunction;\r
\r
ASSERT (LegacyBootEvent != NULL);\r
\r
//\r
// For UEFI 2.0 and the future use an Event Group\r
//\r
+ if (NotifyFunction == NULL) {\r
+ //\r
+ // 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
+ } else {\r
+ WorkerNotifyFunction = NotifyFunction;\r
+ }\r
Status = gBS->CreateEventEx (\r
EVT_NOTIFY_SIGNAL,\r
NotifyTpl,\r
- NotifyFunction,\r
+ WorkerNotifyFunction,\r
NotifyContext,\r
&gEfiEventLegacyBootGuid,\r
LegacyBootEvent\r
change with the version of the specification supported.\r
If ReadyToBootEvent is NULL, then ASSERT().\r
\r
- @param ReadyToBootEvent Returns the EFI event returned from gBS->CreateEvent(Ex).\r
+ @param ReadyToBootEvent Returns the EFI event returned from gBS->CreateEvent(Ex).\r
\r
@retval EFI_SUCCESS Event was created.\r
@retval Other Event was not created.\r
{\r
return EfiCreateEventReadyToBootEx (\r
TPL_CALLBACK,\r
- InternalEmptyFuntion,\r
+ InternalEmptyFunction,\r
NULL,\r
ReadyToBootEvent\r
);\r
OUT EFI_EVENT *ReadyToBootEvent\r
)\r
{\r
- EFI_STATUS Status;\r
+ EFI_STATUS Status;\r
+ EFI_EVENT_NOTIFY WorkerNotifyFunction;\r
\r
ASSERT (ReadyToBootEvent != NULL);\r
\r
//\r
// For UEFI 2.0 and the future use an Event Group\r
//\r
+ if (NotifyFunction == NULL) {\r
+ //\r
+ // 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
+ } else {\r
+ WorkerNotifyFunction = NotifyFunction;\r
+ }\r
Status = gBS->CreateEventEx (\r
EVT_NOTIFY_SIGNAL,\r
NotifyTpl,\r
- NotifyFunction,\r
+ WorkerNotifyFunction,\r
NotifyContext,\r
&gEfiEventReadyToBootGuid,\r
ReadyToBootEvent\r