]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/Event/Event.c
Correct typo in word in DxeCore.
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Event / Event.c
index b2a34593244037a092e791b35caec232cafe7da5..3d15c0c12ba10f31c9762cff98b2dfb8f23d93e6 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   UEFI Event support functions implemented in this file.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2008, 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
 http://opensource.org/licenses/bsd-license.php\r
@@ -22,7 +22,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 EFI_TPL  gEfiCurrentTpl = TPL_APPLICATION;\r
 \r
 ///\r
-/// gEventQueueLock - Protects the event queus\r
+/// gEventQueueLock - Protects the event queues\r
 ///\r
 EFI_LOCK gEventQueueLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL_HIGH_LEVEL);\r
 \r
@@ -399,19 +399,17 @@ CoreCreateEventEx (
   }\r
 \r
   //\r
-  // Allcoate and initialize a new event structure.\r
+  // Allocate and initialize a new event structure.\r
   //\r
-  Status = CoreAllocatePool (\r
-             ((Type & EVT_RUNTIME) != 0) ? EfiRuntimeServicesData: EfiBootServicesData,\r
-             sizeof (IEVENT),\r
-             (VOID **)&IEvent\r
-             );\r
-  if (EFI_ERROR (Status)) {\r
+  if ((Type & EVT_RUNTIME) != 0) {\r
+    IEvent = AllocateRuntimeZeroPool (sizeof (IEVENT));\r
+  } else {\r
+    IEvent = AllocateZeroPool (sizeof (IEVENT));\r
+  }\r
+  if (IEvent == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r
-  ZeroMem (IEvent, sizeof (IEVENT));\r
-\r
   IEvent->Signature = EVENT_SIGNATURE;\r
   IEvent->Type = Type;\r
 \r