TianoCore EDK2 master
Loading...
Searching...
No Matches
UnitTestUefiBootServicesTableLibEventTimer.c File Reference

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)
 

Detailed Description

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.

Function Documentation

◆ UnitTestCheckEvent()

EFI_STATUS EFIAPI UnitTestCheckEvent ( IN EFI_EVENT  UserEvent)

Check the status of an event.

Parameters
UserEventThe event to check
Return values
EFI_SUCCESSThe event is in the signaled state
EFI_NOT_READYThe event is not in the signaled state
EFI_INVALID_PARAMETEREvent is of type EVT_NOTIFY_SIGNAL

Definition at line 141 of file UnitTestUefiBootServicesTableLibEventTimer.c.

◆ UnitTestCloseEvent()

EFI_STATUS EFIAPI UnitTestCloseEvent ( IN EFI_EVENT  UserEvent)

Closes an event and frees the event structure.

Parameters
UserEventEvent to close
Return values
EFI_INVALID_PARAMETERParameters are not valid.
EFI_SUCCESSThe event has been closed

Definition at line 122 of file UnitTestUefiBootServicesTableLibEventTimer.c.

◆ UnitTestCreateEvent()

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.

Parameters
TypeThe type of event to create and its mode and attributes
NotifyTplThe task priority level of event notifications
NotifyFunctionPointer to the events notification function
NotifyContextPointer to the notification functions context corresponds to parameter "Context" in the notification function
EventPointer to the newly created event if the call succeeds undefined otherwise
Return values
EFI_SUCCESSThe event structure was created
EFI_INVALID_PARAMETEROne of the parameters has an invalid value
EFI_OUT_OF_RESOURCESThe event could not be allocated

Definition at line 31 of file UnitTestUefiBootServicesTableLibEventTimer.c.

◆ UnitTestCreateEventEx()

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.

Parameters
TypeThe type of event to create and its mode and attributes
NotifyTplThe task priority level of event notifications
NotifyFunctionPointer to the events notification function
NotifyContextPointer to the notification functions context corresponds to parameter "Context" in the notification function
EventGroupGUID for EventGroup if NULL act the same as gBS->CreateEvent().
EventPointer to the newly created event if the call succeeds undefined otherwise
Return values
EFI_SUCCESSThe event structure was created
EFI_INVALID_PARAMETEROne of the parameters has an invalid value
EFI_OUT_OF_RESOURCESThe event could not be allocated

Definition at line 170 of file UnitTestUefiBootServicesTableLibEventTimer.c.

◆ UnitTestSetTimer()

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.

Parameters
UserEventThe timer event that is to be signaled at the specified time
TypeThe type of time that is specified in TriggerTime
TriggerTimeThe number of 100ns units until the timer expires
Return values
EFI_SUCCESSThe event has been set to be signaled at the requested time
EFI_INVALID_PARAMETEREvent or Type is not valid

Definition at line 59 of file UnitTestUefiBootServicesTableLibEventTimer.c.

◆ UnitTestSignalEvent()

EFI_STATUS EFIAPI UnitTestSignalEvent ( IN EFI_EVENT  UserEvent)

Signals the event. Queues the event to be notified if needed.

Parameters
UserEventThe event to signal .
Return values
EFI_INVALID_PARAMETERParameters are not valid.
EFI_SUCCESSThe event was signaled.

Definition at line 104 of file UnitTestUefiBootServicesTableLibEventTimer.c.

◆ UnitTestWaitForEvent()

EFI_STATUS EFIAPI UnitTestWaitForEvent ( IN UINTN  NumberOfEvents,
IN EFI_EVENT UserEvents,
OUT UINTN UserIndex 
)

Stops execution until an event is signaled.

Parameters
NumberOfEventsThe number of events in the UserEvents array
UserEventsAn array of EFI_EVENT
UserIndexPointer to the index of the event which satisfied the wait condition
Return values
EFI_SUCCESSThe event indicated by Index was signaled.
EFI_INVALID_PARAMETERThe event indicated by Index has a notification function or Event was not a valid type
EFI_UNSUPPORTEDThe current TPL is not TPL_APPLICATION

Definition at line 84 of file UnitTestUefiBootServicesTableLibEventTimer.c.