]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Core/Dxe/Event/Event.h
b8b02b689818c0a6bc106ecfbd1c87f92a531da1
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Event / Event.h
1 /** @file
2 UEFI Event support functions and structure.
3
4 Copyright (c) 2006 - 2008, Intel Corporation. <BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef __EVENT_H__
16 #define __EVENT_H__
17
18
19 #define VALID_TPL(a) ((a) <= TPL_HIGH_LEVEL)
20 extern UINTN gEventPending;
21
22
23 //
24 // EFI_EVENT
25 //
26 #define EVENT_SIGNATURE SIGNATURE_32('e','v','n','t')
27 typedef struct {
28 UINTN Signature;
29 UINT32 Type;
30 UINT32 SignalCount;
31 ///
32 /// Entry if the event is registered to be signalled
33 ///
34 LIST_ENTRY SignalLink;
35 ///
36 /// Notification information for this event
37 ///
38 EFI_TPL NotifyTpl;
39 EFI_EVENT_NOTIFY NotifyFunction;
40 VOID *NotifyContext;
41 EFI_GUID EventGroup;
42 LIST_ENTRY NotifyLink;
43 BOOLEAN ExFlag;
44 ///
45 /// A list of all runtime events
46 ///
47 EFI_RUNTIME_EVENT_ENTRY RuntimeData;
48 ///
49 /// Information by event type
50 ///
51 union {
52 ///
53 /// For timer events
54 ///
55 struct {
56 LIST_ENTRY Link;
57 UINT64 TriggerTime;
58 UINT64 Period;
59 } Timer;
60 } u;
61
62 } IEVENT;
63
64 //
65 // Internal prototypes
66 //
67
68
69 /**
70 Dispatches all pending events.
71
72 @param Priority The task priority level of event notifications
73 to dispatch
74
75 **/
76 VOID
77 CoreDispatchEventNotifies (
78 IN EFI_TPL Priority
79 );
80
81
82 /**
83 Initializes timer support.
84
85 **/
86 VOID
87 CoreInitializeTimer (
88 VOID
89 );
90
91 #endif