X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FCore%2FDxe%2FEvent%2FEvent.c;h=d9fc7586a70cfcdd8ed3ff7052b1a2d1346e52e3;hp=3d15c0c12ba10f31c9762cff98b2dfb8f23d93e6;hb=54cd17e9842d82dae3cd78686e05c4dc37a3540d;hpb=f6079c7003bd2f20e6754e931fd24434a0be5c87 diff --git a/MdeModulePkg/Core/Dxe/Event/Event.c b/MdeModulePkg/Core/Dxe/Event/Event.c index 3d15c0c12b..d9fc7586a7 100644 --- a/MdeModulePkg/Core/Dxe/Event/Event.c +++ b/MdeModulePkg/Core/Dxe/Event/Event.c @@ -1,7 +1,7 @@ /** @file UEFI Event support functions implemented in this file. -Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -87,6 +87,11 @@ UINT32 mEventTable[] = { EVT_TIMER | EVT_NOTIFY_WAIT, }; +/// +/// gIdleLoopEvent - Event which is signalled when the core is idle +/// +EFI_EVENT gIdleLoopEvent = NULL; + /** Enter critical section by acquiring the lock on gEventQueueLock. @@ -134,6 +139,15 @@ CoreInitializeEventServices ( CoreInitializeTimer (); + CoreCreateEventEx ( + EVT_NOTIFY_SIGNAL, + TPL_NOTIFY, + CoreEmptyCallbackFunction, + NULL, + &gIdleLoopEventGuid, + &gIdleLoopEvent + ); + return EFI_SUCCESS; } @@ -630,9 +644,9 @@ CoreWaitForEvent ( } // - // This was the location of the Idle loop callback in EFI 1.x reference - // code. We don't have that concept in this base at this point. + // Signal the Idle event // + CoreSignalEvent (gIdleLoopEvent); } } @@ -702,3 +716,4 @@ CoreCloseEvent ( return Status; } +