|
OpenCore
1.0.6
OpenCore Bootloader
|
Go to the source code of this file.
Data Structures | |
| struct | USER_EVENT |
Functions | |
| STATIC UINT64 | UserEventGetTimeNow (VOID) |
| STATIC USER_EVENT * | UserEventAlloc (VOID) |
| STATIC VOID | UserEventDispatch (VOID) |
| STATIC VOID | UserEventInitializer (VOID) |
| STATIC VOID | UserEventInit (VOID) |
| EFI_STATUS EFIAPI | UserCreateEventEx (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 | UserCreateEvent (IN UINT32 Type, IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL, IN VOID *NotifyContext OPTIONAL, OUT EFI_EVENT *Event) |
| EFI_STATUS EFIAPI | UserCloseEvent (IN EFI_EVENT Event) |
| EFI_STATUS EFIAPI | UserSignalEvent (IN EFI_EVENT Event) |
| EFI_STATUS EFIAPI | UserCheckEvent (IN EFI_EVENT Event) |
| EFI_STATUS EFIAPI | UserWaitForEvent (IN UINTN NumberOfEvents, IN EFI_EVENT *Events, OUT UINTN *Index) |
| EFI_STATUS EFIAPI | UserSetTimer (IN EFI_EVENT Event, IN EFI_TIMER_DELAY Type, IN UINT64 TriggerTime) |
| EFI_TPL EFIAPI | UserRaiseTPL (IN EFI_TPL NewTpl) |
| VOID EFIAPI | UserRestoreTPL (IN EFI_TPL OldTpl) |
| BOOLEAN | UserEventDispatchNow (VOID) |
Variables | |
| STATIC BOOLEAN | mEventNeedInit = TRUE |
| STATIC EFI_TPL | mCurTPL = 0 |
| STATIC USER_EVENT | mEvents [USER_EVENT_MAXNUM] |
Copyright (c) 2025, Pavel Naberezhnev. All rights reserved. SPDX-License-Identifier: BSD-3-Clause
Definition in file UserEvent.c.
| EFI_STATUS EFIAPI UserCheckEvent | ( | IN EFI_EVENT | Event | ) |
Checks whether an event is in the signaled state.
| [in] | Event | The event to check. |
| EFI_SUCCESS | The event is in the signaled state. |
| EFI_NOT_READY | The event is not in the signaled state. |
| EFI_INVALID_PARAMETER | Event is of type EVT_NOTIFY_SIGNAL. |
Definition at line 425 of file UserEvent.c.
| EFI_STATUS EFIAPI UserCloseEvent | ( | IN EFI_EVENT | Event | ) |
Closes an event.
| [in] | Event | The event to close. |
| EFI_SUCCESS | The event has been closed. |
Definition at line 364 of file UserEvent.c.
| EFI_STATUS EFIAPI UserCreateEvent | ( | IN UINT32 | Type, |
| IN EFI_TPL | NotifyTpl, | ||
| IN EFI_EVENT_NOTIFY NotifyFunction | OPTIONAL, | ||
| IN VOID *NotifyContext | OPTIONAL, | ||
| OUT EFI_EVENT * | Event ) |
Creates an event.
| [in] | Type | The type of event to create and its mode and attributes. |
| [in] | NotifyTpl | The task priority level of event notifications, if needed. |
| [in] | NotifyFunction | Pointer to the event's notification function, if any. |
| [in] | NotifyContext | Pointer to the notification function's context; corresponds to parameter Context in the notification function. |
| [out] | Event | Pointer to the newly created event if the call succeeds. |
| EFI_SUCCESS | The event structure was created. |
| EFI_INVALID_PARAMETER | One of the parameters has an invalid value. |
| EFI_INVALID_PARAMETER | Event is NULL. |
| EFI_INVALID_PARAMETER | Type has an unsupported bit set. |
| EFI_INVALID_PARAMETER | Type has both EVT_NOTIFY_SINGAL and EVT_NOTIFY_WAIT set. |
| EFI_INVALID_PARAMETER | Type has either EVT_NOTIFY_SIGNAL or EVT_NOTIFY_WAIT set and NotifyFunction is NULL. |
| EFI_INVALID_PARAMETER | Type has either EVT_NOTIFY_SIGNAL or EVT_NOTIFY_WAIT set and NotifyTpl is not a supported TPL level. |
| EFI_OUT_OF_RESOURCES | The event could not be allocated. |
Definition at line 337 of file UserEvent.c.
| EFI_STATUS EFIAPI UserCreateEventEx | ( | 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 ) |
Creates an event in a group.
| [in] | Type | The type of event to create and its mode and attributes. |
| [in] | NotifyTpl | The task priority level of event notifiactions, if needed. |
| [in] | NotifyFunction | Pointer to the event's notification function, if any. |
| [in] | NotifyContext | Pointer to the notification function's context; corresponds to to parameter Context in the notificatuin function. |
| [in] | EventGroup | Pointer to the unique identifier of the group to which this event belongs. Maybe NULL. |
| [out] | Event | Pointer to the newly created event if the call succeeds. |
| EFI_SUCCESS | The event structure was created. |
| EFI_INVALID_PARAMETER | One of the parameters has an invalid value. |
| EFI_INVALID_PARAMETER | Event is NULL. |
| EFI_INVALID_PARAMETER | Type has an unsupported bit set. |
| EFI_INVALID_PARAMETER | Type has both EVT_NOTIFY_SIGNAL and EVT_NOTIFY_WAIT set. |
| EFI_INVALID_PARAMETER | Type has either EVT_NOTIFY_SIGNAL or EVT_NOTIFY_WAIT set and NotifyFunction is NULL. |
| EFI_INVALID_PARAMETER | Type has either EVT_NOTIFY_SIGNAL or EVT_NOTIFY_WAIT set and NotifyTpl is not a supported TPL level. |
| EFI_OUT_OF_RESOURCES | The event could not be allocated. |
Definition at line 248 of file UserEvent.c.
| STATIC USER_EVENT * UserEventAlloc | ( | VOID | ) |
Allocates an Event descriptor
Definition at line 102 of file UserEvent.c.
| STATIC VOID UserEventDispatch | ( | VOID | ) |
Dispatches signaled events and triggers active timers
Definition at line 123 of file UserEvent.c.
| BOOLEAN UserEventDispatchNow | ( | VOID | ) |
Immediately triggers event dispatch.
Definition at line 657 of file UserEvent.c.
| STATIC UINT64 UserEventGetTimeNow | ( | VOID | ) |
Returns current time in nanoseconds
Definition at line 57 of file UserEvent.c.
| STATIC VOID UserEventInit | ( | VOID | ) |
Calls UserEventInitializer() if needed
Definition at line 213 of file UserEvent.c.
| STATIC VOID UserEventInitializer | ( | VOID | ) |
Inits the Event subsystem
Definition at line 190 of file UserEvent.c.
| EFI_TPL EFIAPI UserRaiseTPL | ( | IN EFI_TPL | NewTpl | ) |
Raises a task's priority level and returns its previous level.
| [in] | NewTpl | The new task priority level. It must be greather than or equal to the current TPL. |
Definition at line 611 of file UserEvent.c.
| VOID EFIAPI UserRestoreTPL | ( | IN EFI_TPL | OldTpl | ) |
Restores a task's priority level to its previous value.
| [in] | OldTpl | The previous task priority level to restore. |
Definition at line 636 of file UserEvent.c.
| EFI_STATUS EFIAPI UserSetTimer | ( | IN EFI_EVENT | Event, |
| IN EFI_TIMER_DELAY | Type, | ||
| IN UINT64 | TriggerTime ) |
Sets the type of timer and the trigger time for a timer event.
| [in] | Event | The timer event that is to be signaled at the specified time. |
| [in] | Type | The type of time is specified in TriggerTime. |
| [in] | TriggerTime | The number if 100ns units untill the timer expires. |
| EFI_SUCCESS | The event has been set to be signaled at the requested time. |
| EFI_INVALID_PARAMETER | Event or Type is not valid. |
Definition at line 556 of file UserEvent.c.
| EFI_STATUS EFIAPI UserSignalEvent | ( | IN EFI_EVENT | Event | ) |
Signals an event.
| [in] | Event | The event to signal. |
| EFI_SUCCESS | The event was signaled. |
Definition at line 392 of file UserEvent.c.
| EFI_STATUS EFIAPI UserWaitForEvent | ( | IN UINTN | NumberOfEvents, |
| IN EFI_EVENT * | Events, | ||
| OUT UINTN * | Index ) |
Stops execution untill an event is signaled.
| [in] | NumberOfEvents | The number of events in the Events array. |
| [in] | Events | An array of EFI_EVENT. |
| [out] | Index | Pointer to the index of the event which satisfied the wait condition. |
| EFI_SUCCESS | The event indicated by Index was signaled. |
| EFI_INVALID_PARAMETER | NumberOfEvents is 0. |
| EFI_INVALID_PARAMETER | The event indicated by Index is of type EVT_NOTIFY_SIGNAL. |
| EFI_UNSUPPORTED | The current TPL is not TPL_APPLICATION. |
Definition at line 481 of file UserEvent.c.
| STATIC EFI_TPL mCurTPL = 0 |
Definition at line 49 of file UserEvent.c.
| STATIC BOOLEAN mEventNeedInit = TRUE |
Local variables
mEventNeedInit Do we need to initialize the event subsystem? mCurTPL The current TPL value mEvents The static array of Event descriptor
Definition at line 48 of file UserEvent.c.
| STATIC USER_EVENT mEvents[USER_EVENT_MAXNUM] |
Definition at line 50 of file UserEvent.c.