2 Implementation of event and timer related services in the UEFI Boot Services table for use in unit tests.
4 Copyright (c) Microsoft Corporation
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #include "UefiBootServicesTableLibUnitTest.h"
14 @param Type The type of event to create and its mode and
16 @param NotifyTpl The task priority level of event notifications
17 @param NotifyFunction Pointer to the events notification function
18 @param NotifyContext Pointer to the notification functions context
19 corresponds to parameter "Context" in the
21 @param Event Pointer to the newly created event if the call
22 succeeds undefined otherwise
24 @retval EFI_SUCCESS The event structure was created
25 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value
26 @retval EFI_OUT_OF_RESOURCES The event could not be allocated
34 IN EFI_EVENT_NOTIFY NotifyFunction
, OPTIONAL
35 IN VOID
*NotifyContext
, OPTIONAL
39 return EFI_NOT_AVAILABLE_YET
;
43 Sets the type of timer and the trigger time for a timer event.
45 @param UserEvent The timer event that is to be signaled at the
47 @param Type The type of time that is specified in
49 @param TriggerTime The number of 100ns units until the timer
52 @retval EFI_SUCCESS The event has been set to be signaled at the
54 @retval EFI_INVALID_PARAMETER Event or Type is not valid
60 IN EFI_EVENT UserEvent
,
61 IN EFI_TIMER_DELAY Type
,
65 return EFI_NOT_AVAILABLE_YET
;
69 Stops execution until an event is signaled.
71 @param NumberOfEvents The number of events in the UserEvents array
72 @param UserEvents An array of EFI_EVENT
73 @param UserIndex Pointer to the index of the event which
74 satisfied the wait condition
76 @retval EFI_SUCCESS The event indicated by Index was signaled.
77 @retval EFI_INVALID_PARAMETER The event indicated by Index has a notification
78 function or Event was not a valid type
79 @retval EFI_UNSUPPORTED The current TPL is not TPL_APPLICATION
84 UnitTestWaitForEvent (
85 IN UINTN NumberOfEvents
,
86 IN EFI_EVENT
*UserEvents
,
90 return EFI_NOT_AVAILABLE_YET
;
94 Signals the event. Queues the event to be notified if needed.
96 @param UserEvent The event to signal .
98 @retval EFI_INVALID_PARAMETER Parameters are not valid.
99 @retval EFI_SUCCESS The event was signaled.
104 UnitTestSignalEvent (
105 IN EFI_EVENT UserEvent
108 return EFI_NOT_AVAILABLE_YET
;
112 Closes an event and frees the event structure.
114 @param UserEvent Event to close
116 @retval EFI_INVALID_PARAMETER Parameters are not valid.
117 @retval EFI_SUCCESS The event has been closed
123 IN EFI_EVENT UserEvent
126 return EFI_NOT_AVAILABLE_YET
;
130 Check the status of an event.
132 @param UserEvent The event to check
134 @retval EFI_SUCCESS The event is in the signaled state
135 @retval EFI_NOT_READY The event is not in the signaled state
136 @retval EFI_INVALID_PARAMETER Event is of type EVT_NOTIFY_SIGNAL
142 IN EFI_EVENT UserEvent
145 return EFI_NOT_AVAILABLE_YET
;
149 Creates an event in a group.
151 @param Type The type of event to create and its mode and
153 @param NotifyTpl The task priority level of event notifications
154 @param NotifyFunction Pointer to the events notification function
155 @param NotifyContext Pointer to the notification functions context
156 corresponds to parameter "Context" in the
157 notification function
158 @param EventGroup GUID for EventGroup if NULL act the same as
160 @param Event Pointer to the newly created event if the call
161 succeeds undefined otherwise
163 @retval EFI_SUCCESS The event structure was created
164 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value
165 @retval EFI_OUT_OF_RESOURCES The event could not be allocated
170 UnitTestCreateEventEx (
172 IN EFI_TPL NotifyTpl
,
173 IN EFI_EVENT_NOTIFY NotifyFunction
, OPTIONAL
174 IN CONST VOID
*NotifyContext
, OPTIONAL
175 IN CONST EFI_GUID
*EventGroup
, OPTIONAL
179 return EFI_NOT_AVAILABLE_YET
;