TianoCore EDK2 master
|
#include "UnitTestUefiBootServicesTableLib.h"
Go to the source code of this file.
Functions | |
EFI_STATUS EFIAPI | UnitTestCreateEvent (IN UINT32 Type, IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL IN VOID *NotifyContext, OPTIONAL OUT EFI_EVENT *Event) |
EFI_STATUS EFIAPI | UnitTestSetTimer (IN EFI_EVENT UserEvent, IN EFI_TIMER_DELAY Type, IN UINT64 TriggerTime) |
EFI_STATUS EFIAPI | UnitTestWaitForEvent (IN UINTN NumberOfEvents, IN EFI_EVENT *UserEvents, OUT UINTN *UserIndex) |
EFI_STATUS EFIAPI | UnitTestSignalEvent (IN EFI_EVENT UserEvent) |
EFI_STATUS EFIAPI | UnitTestCloseEvent (IN EFI_EVENT UserEvent) |
EFI_STATUS EFIAPI | UnitTestCheckEvent (IN EFI_EVENT UserEvent) |
EFI_STATUS EFIAPI | UnitTestCreateEventEx (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) |
Implementation of event and timer related services in the UEFI Boot Services table for use in unit tests.
Copyright (c) Microsoft Corporation SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file UnitTestUefiBootServicesTableLibEventTimer.c.
EFI_STATUS EFIAPI UnitTestCheckEvent | ( | IN EFI_EVENT | UserEvent | ) |
Check the status of an event.
UserEvent | 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 141 of file UnitTestUefiBootServicesTableLibEventTimer.c.
EFI_STATUS EFIAPI UnitTestCloseEvent | ( | IN EFI_EVENT | UserEvent | ) |
Closes an event and frees the event structure.
UserEvent | Event to close |
EFI_INVALID_PARAMETER | Parameters are not valid. |
EFI_SUCCESS | The event has been closed |
Definition at line 122 of file UnitTestUefiBootServicesTableLibEventTimer.c.
EFI_STATUS EFIAPI UnitTestCreateEvent | ( | IN UINT32 | Type, |
IN EFI_TPL | NotifyTpl, | ||
IN EFI_EVENT_NOTIFY | NotifyFunction, | ||
OPTIONAL IN VOID * | NotifyContext, | ||
OPTIONAL OUT EFI_EVENT * | Event | ||
) |
Creates an event.
Type | The type of event to create and its mode and attributes |
NotifyTpl | The task priority level of event notifications |
NotifyFunction | Pointer to the events notification function |
NotifyContext | Pointer to the notification functions context corresponds to parameter "Context" in the notification function |
Event | Pointer to the newly created event if the call succeeds undefined otherwise |
EFI_SUCCESS | The event structure was created |
EFI_INVALID_PARAMETER | One of the parameters has an invalid value |
EFI_OUT_OF_RESOURCES | The event could not be allocated |
Definition at line 31 of file UnitTestUefiBootServicesTableLibEventTimer.c.
EFI_STATUS EFIAPI UnitTestCreateEventEx | ( | 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.
Type | The type of event to create and its mode and attributes |
NotifyTpl | The task priority level of event notifications |
NotifyFunction | Pointer to the events notification function |
NotifyContext | Pointer to the notification functions context corresponds to parameter "Context" in the notification function |
EventGroup | GUID for EventGroup if NULL act the same as gBS->CreateEvent(). |
Event | Pointer to the newly created event if the call succeeds undefined otherwise |
EFI_SUCCESS | The event structure was created |
EFI_INVALID_PARAMETER | One of the parameters has an invalid value |
EFI_OUT_OF_RESOURCES | The event could not be allocated |
Definition at line 170 of file UnitTestUefiBootServicesTableLibEventTimer.c.
EFI_STATUS EFIAPI UnitTestSetTimer | ( | IN EFI_EVENT | UserEvent, |
IN EFI_TIMER_DELAY | Type, | ||
IN UINT64 | TriggerTime | ||
) |
Sets the type of timer and the trigger time for a timer event.
UserEvent | The timer event that is to be signaled at the specified time |
Type | The type of time that is specified in TriggerTime |
TriggerTime | The number of 100ns units until 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 59 of file UnitTestUefiBootServicesTableLibEventTimer.c.
EFI_STATUS EFIAPI UnitTestSignalEvent | ( | IN EFI_EVENT | UserEvent | ) |
Signals the event. Queues the event to be notified if needed.
UserEvent | The event to signal . |
EFI_INVALID_PARAMETER | Parameters are not valid. |
EFI_SUCCESS | The event was signaled. |
Definition at line 104 of file UnitTestUefiBootServicesTableLibEventTimer.c.
EFI_STATUS EFIAPI UnitTestWaitForEvent | ( | IN UINTN | NumberOfEvents, |
IN EFI_EVENT * | UserEvents, | ||
OUT UINTN * | UserIndex | ||
) |
Stops execution until an event is signaled.
NumberOfEvents | The number of events in the UserEvents array |
UserEvents | An array of EFI_EVENT |
UserIndex | Pointer to the index of the event which satisfied the wait condition |
EFI_SUCCESS | The event indicated by Index was signaled. |
EFI_INVALID_PARAMETER | The event indicated by Index has a notification function or Event was not a valid type |
EFI_UNSUPPORTED | The current TPL is not TPL_APPLICATION |
Definition at line 84 of file UnitTestUefiBootServicesTableLibEventTimer.c.