]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdeModulePkg/Core/Dxe/Library.h
Clean up DxeCore to remove duplicate memory allocation & device path utility services...
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Library.h
... / ...
CommitLineData
1/** @file\r
2 Internal functions shared in DxeCore module.\r
3\r
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
12\r
13**/\r
14\r
15#ifndef _DXE_LIBRARY_H_\r
16#define _DXE_LIBRARY_H_\r
17\r
18\r
19\r
20/**\r
21 Report status code of type EFI_PROGRESS_CODE by caller ID gEfiCallerIdGuid.\r
22\r
23 @param Value Describes the class/subclass/operation of the\r
24 hardware or software entity that the Status Code\r
25 relates to.\r
26\r
27**/\r
28VOID\r
29CoreReportProgressCode (\r
30 IN EFI_STATUS_CODE_VALUE Value\r
31 );\r
32\r
33\r
34/**\r
35 Report status code of type EFI_PROGRESS_CODE by caller ID gEfiCallerIdGuid,\r
36 with a handle as additional information.\r
37\r
38 @param Value Describes the class/subclass/operation of the\r
39 hardware or software entity that the Status Code\r
40 relates to.\r
41 @param Handle Additional information.\r
42\r
43**/\r
44VOID\r
45CoreReportProgressCodeSpecific (\r
46 IN EFI_STATUS_CODE_VALUE Value,\r
47 IN EFI_HANDLE Handle\r
48 );\r
49\r
50\r
51/**\r
52 Raising to the task priority level of the mutual exclusion\r
53 lock, and then acquires ownership of the lock.\r
54\r
55 @param Lock The lock to acquire\r
56\r
57 @return Lock owned\r
58\r
59**/\r
60VOID\r
61CoreAcquireLock (\r
62 IN EFI_LOCK *Lock\r
63 );\r
64\r
65\r
66/**\r
67 Initialize a basic mutual exclusion lock. Each lock\r
68 provides mutual exclusion access at it's task priority\r
69 level. Since there is no-premption (at any TPL) or\r
70 multiprocessor support, acquiring the lock only consists\r
71 of raising to the locks TPL.\r
72\r
73 @param Lock The EFI_LOCK structure to initialize\r
74\r
75 @retval EFI_SUCCESS Lock Owned.\r
76 @retval EFI_ACCESS_DENIED Reentrant Lock Acquisition, Lock not Owned.\r
77\r
78**/\r
79EFI_STATUS\r
80CoreAcquireLockOrFail (\r
81 IN EFI_LOCK *Lock\r
82 );\r
83\r
84\r
85/**\r
86 Releases ownership of the mutual exclusion lock, and\r
87 restores the previous task priority level.\r
88\r
89 @param Lock The lock to release\r
90\r
91 @return Lock unowned\r
92\r
93**/\r
94VOID\r
95CoreReleaseLock (\r
96 IN EFI_LOCK *Lock\r
97 );\r
98\r
99\r
100/**\r
101 Create a protocol notification event and return it.\r
102\r
103 @param ProtocolGuid Protocol to register notification event on.\r
104 @param NotifyTpl Maximum TPL to signal the NotifyFunction.\r
105 @param NotifyFunction EFI notification routine.\r
106 @param NotifyContext Context passed into Event when it is created.\r
107 @param Registration Registration key returned from\r
108 RegisterProtocolNotify().\r
109 @param SignalFlag Boolean value to decide whether kick the event after\r
110 register or not.\r
111\r
112 @return The EFI_EVENT that has been registered to be signaled when a ProtocolGuid\r
113 is added to the system.\r
114\r
115**/\r
116EFI_EVENT\r
117CoreCreateProtocolNotifyEvent (\r
118 IN EFI_GUID *ProtocolGuid,\r
119 IN EFI_TPL NotifyTpl,\r
120 IN EFI_EVENT_NOTIFY NotifyFunction,\r
121 IN VOID *NotifyContext,\r
122 OUT VOID **Registration,\r
123 IN BOOLEAN SignalFlag\r
124 );\r
125\r
126#endif\r