/** @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
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
}\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