]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Core/Dxe/Event/Event.h
b88effacd9dac9b97137f3d7b52528c822eed8aa
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Event / Event.h
1 /** @file
2 UEFI Event support functions and structure.
3
4 Copyright (c) 2006 - 2010, 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
27 ///
28 /// Timer event information
29 ///
30 typedef struct {
31 LIST_ENTRY Link;
32 UINT64 TriggerTime;
33 UINT64 Period;
34 } TIMER_EVENT_INFO;
35
36 #define EVENT_SIGNATURE SIGNATURE_32('e','v','n','t')
37 typedef struct {
38 UINTN Signature;
39 UINT32 Type;
40 UINT32 SignalCount;
41 ///
42 /// Entry if the event is registered to be signalled
43 ///
44 LIST_ENTRY SignalLink;
45 ///
46 /// Notification information for this event
47 ///
48 EFI_TPL NotifyTpl;
49 EFI_EVENT_NOTIFY NotifyFunction;
50 VOID *NotifyContext;
51 EFI_GUID EventGroup;
52 LIST_ENTRY NotifyLink;
53 BOOLEAN ExFlag;
54 ///
55 /// A list of all runtime events
56 ///
57 EFI_RUNTIME_EVENT_ENTRY RuntimeData;
58 TIMER_EVENT_INFO Timer;
59 } IEVENT;
60
61 //
62 // Internal prototypes
63 //
64
65
66 /**
67 Dispatches all pending events.
68
69 @param Priority The task priority level of event notifications
70 to dispatch
71
72 **/
73 VOID
74 CoreDispatchEventNotifies (
75 IN EFI_TPL Priority
76 );
77
78
79 /**
80 Initializes timer support.
81
82 **/
83 VOID
84 CoreInitializeTimer (
85 VOID
86 );
87
88 #endif