]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Core/Dxe/Event.h
Apply HighBitSet() in MDE baseLib to retire the internal function CoreHighestSetBit().
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Event.h
CommitLineData
23c98c94 1/** @file\r
504214c4
LG
2 UEFI Event support functions and structure.\r
3\r
23c98c94 4Copyright (c) 2006 - 2008, 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
28a00297 12\r
504214c4 13**/\r
28a00297 14\r
5f3232d7 15#ifndef __EVENT_H__\r
16#define __EVENT_H__\r
28a00297 17\r
18#define VALID_TPL(a) ((a) <= TPL_HIGH_LEVEL)\r
19\r
20//\r
21// EFI_EVENT\r
22//\r
28a00297 23#define EVENT_SIGNATURE EFI_SIGNATURE_32('e','v','n','t')\r
24typedef struct {\r
25 UINTN Signature;\r
26 UINT32 Type;\r
27 UINT32 SignalCount;\r
28\r
29 //\r
30 // Entry if the event is registered to be signalled\r
31 //\r
32\r
33 LIST_ENTRY SignalLink;\r
34\r
35 //\r
36 // Notification information for this event\r
37 //\r
38\r
39 EFI_TPL NotifyTpl;\r
40 EFI_EVENT_NOTIFY NotifyFunction;\r
41 VOID *NotifyContext;\r
42 EFI_GUID EventGroup;\r
022c6d45 43 LIST_ENTRY NotifyLink;\r
28a00297 44 BOOLEAN ExFlag;\r
022c6d45 45\r
28a00297 46 //\r
47 // A list of all runtime events\r
48 //\r
49 EFI_RUNTIME_EVENT_ENTRY RuntimeData;\r
50\r
51 //\r
52 // Information by event type\r
53 //\r
54\r
55 union {\r
56 //\r
57 // For timer events\r
58 //\r
59 struct {\r
60 LIST_ENTRY Link;\r
61 UINT64 TriggerTime;\r
62 UINT64 Period;\r
63 } Timer;\r
64 } u;\r
65\r
022c6d45 66} IEVENT;\r
28a00297 67\r
68//\r
69// Internal prototypes\r
70//\r
71\r
162ed594 72\r
73/**\r
74 Dispatches all pending events.\r
75\r
022c6d45 76 @param Priority The task priority level of event notifications\r
162ed594 77 to dispatch\r
78\r
79**/\r
28a00297 80VOID\r
81CoreDispatchEventNotifies (\r
82 IN EFI_TPL Priority\r
23c98c94 83 );\r
28a00297 84\r
28a00297 85\r
28a00297 86\r
28a00297 87//\r
88// Exported functions\r
89//\r
162ed594 90/**\r
91 Initializes timer support.\r
28a00297 92\r
162ed594 93**/\r
28a00297 94VOID\r
95CoreInitializeTimer (\r
96 VOID\r
23c98c94 97 );\r
28a00297 98\r
99//\r
100// extern data declarations\r
101//\r
102\r
103extern EFI_LOCK gEventQueueLock;\r
104extern UINTN gEventPending;\r
105extern LIST_ENTRY gEventQueue[];\r
106extern LIST_ENTRY gEventSignalQueue;\r
28a00297 107\r
108#endif\r