46 EVT_TIMER | EVT_NOTIFY_SIGNAL,
65 EVT_SIGNAL_EXIT_BOOT_SERVICES,
69 EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,
81 EVT_TIMER | EVT_NOTIFY_WAIT,
126 for (Index = 0; Index <= TPL_HIGH_LEVEL; Index++) {
167 Event =
CR (Head->ForwardLink,
IEVENT, NotifyLink, EVENT_SIGNATURE);
170 Event->NotifyLink.ForwardLink =
NULL;
176 if ((Event->Type & EVT_NOTIFY_SIGNAL) != 0) {
177 Event->SignalCount = 0;
185 ASSERT (Event->NotifyFunction !=
NULL);
186 Event->NotifyFunction (Event, Event->NotifyContext);
218 if (Event->NotifyLink.ForwardLink !=
NULL) {
220 Event->NotifyLink.ForwardLink =
NULL;
249 for (Link = Head->ForwardLink; Link != Head; Link = Link->ForwardLink) {
250 Event =
CR (Link,
IEVENT, SignalLink, EVENT_SIGNATURE);
251 if (
CompareGuid (&Event->EventGroup, EventGroup)) {
283 IN VOID *NotifyContext OPTIONAL,
316 IN CONST VOID *NotifyContext OPTIONAL,
324 if ((Type & (EVT_NOTIFY_WAIT | EVT_NOTIFY_SIGNAL)) != 0) {
325 if ((NotifyTpl != TPL_APPLICATION) &&
326 (NotifyTpl != TPL_CALLBACK) &&
327 (NotifyTpl != TPL_NOTIFY))
329 return EFI_INVALID_PARAMETER;
362 IN CONST VOID *NotifyContext OPTIONAL,
372 return EFI_INVALID_PARAMETER;
378 Status = EFI_INVALID_PARAMETER;
379 for (Index = 0; Index < (
sizeof (
mEventTable) /
sizeof (UINT32)); Index++) {
386 if (EFI_ERROR (Status)) {
387 return EFI_INVALID_PARAMETER;
393 if (EventGroup !=
NULL) {
398 if ((Type == EVT_SIGNAL_EXIT_BOOT_SERVICES) || (Type == EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE)) {
399 return EFI_INVALID_PARAMETER;
402 if (
CompareGuid (EventGroup, &gEfiEventExitBootServicesGuid)) {
403 Type = EVT_SIGNAL_EXIT_BOOT_SERVICES;
404 }
else if (
CompareGuid (EventGroup, &gEfiEventVirtualAddressChangeGuid)) {
405 Type = EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE;
411 if (Type == EVT_SIGNAL_EXIT_BOOT_SERVICES) {
412 EventGroup = &gEfiEventExitBootServicesGuid;
413 }
else if (Type == EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE) {
414 EventGroup = &gEfiEventVirtualAddressChangeGuid;
421 if ((Type & (EVT_NOTIFY_WAIT | EVT_NOTIFY_SIGNAL)) != 0) {
426 (NotifyTpl <= TPL_APPLICATION) ||
427 (NotifyTpl >= TPL_HIGH_LEVEL))
429 return EFI_INVALID_PARAMETER;
437 NotifyContext =
NULL;
443 if ((Type & EVT_RUNTIME) != 0) {
449 if (IEvent ==
NULL) {
450 return EFI_OUT_OF_RESOURCES;
453 IEvent->Signature = EVENT_SIGNATURE;
458 IEvent->NotifyContext = (VOID *)NotifyContext;
459 if (EventGroup !=
NULL) {
460 CopyGuid (&IEvent->EventGroup, EventGroup);
466 if ((Type & EVT_RUNTIME) != 0) {
488 if ((Type & EVT_NOTIFY_SIGNAL) != 0x00000000) {
523 return EFI_INVALID_PARAMETER;
526 if (Event->Signature != EVENT_SIGNATURE) {
527 return EFI_INVALID_PARAMETER;
536 if (Event->SignalCount == 0x00000000) {
537 Event->SignalCount++;
542 if ((Event->Type & EVT_NOTIFY_SIGNAL) != 0) {
583 return EFI_INVALID_PARAMETER;
586 if (Event->Signature != EVENT_SIGNATURE) {
587 return EFI_INVALID_PARAMETER;
590 if ((Event->Type & EVT_NOTIFY_SIGNAL) != 0) {
591 return EFI_INVALID_PARAMETER;
594 Status = EFI_NOT_READY;
596 if ((Event->SignalCount == 0) && ((Event->Type & EVT_NOTIFY_WAIT) != 0)) {
601 if (Event->SignalCount == 0) {
612 if (Event->SignalCount != 0) {
615 if (Event->SignalCount != 0) {
616 Event->SignalCount = 0;
655 return EFI_UNSUPPORTED;
658 if (NumberOfEvents == 0) {
659 return EFI_INVALID_PARAMETER;
662 if (UserEvents ==
NULL) {
663 return EFI_INVALID_PARAMETER;
667 for (Index = 0; Index < NumberOfEvents; Index++) {
673 if (Status != EFI_NOT_READY) {
674 if (UserIndex !=
NULL) {
710 return EFI_INVALID_PARAMETER;
713 if (Event->Signature != EVENT_SIGNATURE) {
714 return EFI_INVALID_PARAMETER;
720 if ((Event->Type & EVT_TIMER) != 0) {
734 if (Event->NotifyLink.ForwardLink !=
NULL) {
755 Event->Signature = 0;
BOOLEAN EFIAPI IsListEmpty(IN CONST LIST_ENTRY *ListHead)
LIST_ENTRY *EFIAPI InsertHeadList(IN OUT LIST_ENTRY *ListHead, IN OUT LIST_ENTRY *Entry)
LIST_ENTRY *EFIAPI RemoveEntryList(IN CONST LIST_ENTRY *Entry)
LIST_ENTRY *EFIAPI InitializeListHead(IN OUT LIST_ENTRY *ListHead)
#define INITIALIZE_LIST_HEAD_VARIABLE(ListHead)
LIST_ENTRY *EFIAPI InsertTailList(IN OUT LIST_ENTRY *ListHead, IN OUT LIST_ENTRY *Entry)
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
GUID *EFIAPI CopyGuid(OUT GUID *DestinationGuid, IN CONST GUID *SourceGuid)
EFI_STATUS EFIAPI CoreSetTimer(IN EFI_EVENT UserEvent, IN EFI_TIMER_DELAY Type, IN UINT64 TriggerTime)
VOID CoreAcquireLock(IN EFI_LOCK *Lock)
VOID CoreReleaseLock(IN EFI_LOCK *Lock)
EFI_STATUS EFIAPI CoreFreePool(IN VOID *Buffer)
EFI_STATUS CoreUnregisterProtocolNotify(IN EFI_EVENT Event)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID *EFIAPI AllocateRuntimeZeroPool(IN UINTN AllocationSize)
VOID CoreReleaseEventLock(VOID)
EFI_STATUS CoreInitializeEventServices(VOID)
LIST_ENTRY gEventSignalQueue
LIST_ENTRY gEventQueue[TPL_HIGH_LEVEL+1]
EFI_STATUS EFIAPI CoreCheckEvent(IN EFI_EVENT UserEvent)
EFI_STATUS EFIAPI CoreCreateEventInternal(IN UINT32 Type, IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL, IN CONST VOID *NotifyContext OPTIONAL, IN CONST EFI_GUID *EventGroup OPTIONAL, OUT EFI_EVENT *Event)
EFI_STATUS EFIAPI CoreSignalEvent(IN EFI_EVENT UserEvent)
VOID CoreNotifySignalList(IN EFI_GUID *EventGroup)
EFI_STATUS EFIAPI CoreCreateEventEx(IN UINT32 Type, IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL, IN CONST VOID *NotifyContext OPTIONAL, IN CONST EFI_GUID *EventGroup OPTIONAL, OUT EFI_EVENT *Event)
VOID CoreDispatchEventNotifies(IN EFI_TPL Priority)
EFI_STATUS EFIAPI CoreCloseEvent(IN EFI_EVENT UserEvent)
EFI_STATUS EFIAPI CoreWaitForEvent(IN UINTN NumberOfEvents, IN EFI_EVENT *UserEvents, OUT UINTN *UserIndex)
VOID CoreAcquireEventLock(VOID)
VOID CoreNotifyEvent(IN IEVENT *Event)
EFI_STATUS EFIAPI CoreCreateEvent(IN UINT32 Type, IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL, IN VOID *NotifyContext OPTIONAL, OUT EFI_EVENT *Event)
#define EVT_EXFLAG_EVENT_GROUP
VOID CoreInitializeTimer(VOID)
#define EVT_EXFLAG_EVENT_PROTOCOL_NOTIFICATION
#define ASSERT_EFI_ERROR(StatusParameter)
#define CR(Record, TYPE, Field, TestSignature)
VOID EFIAPI NotifyFunction(IN EFI_EVENT Event, IN VOID *Context)
#define EFI_INITIALIZE_LOCK_VARIABLE(Priority)
VOID EFIAPI EfiEventEmptyFunction(IN EFI_EVENT Event, IN VOID *Context)
#define ASSERT_LOCKED(LockParameter)
VOID(EFIAPI * EFI_EVENT_NOTIFY)(IN EFI_EVENT Event, IN VOID *Context)
EFI_LIST_ENTRY EventHead
A list of type EFI_RUNTIME_EVENT_ENTRY.
EFI_EVENT_NOTIFY NotifyFunction
EFI_RUNTIME_EVENT_ENTRY RuntimeData