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