]>
Commit | Line | Data |
---|---|---|
23c98c94 | 1 | /** @file\r |
504214c4 | 2 | Internal functions shared in DxeCore module.\r |
28a00297 | 3 | \r |
23c98c94 | 4 | Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r |
5 | All rights reserved. This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
28a00297 | 9 | \r |
23c98c94 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
162ed594 | 12 | \r |
13 | **/\r | |
28a00297 | 14 | \r |
15 | #ifndef _DXE_LIBRARY_H_\r | |
16 | #define _DXE_LIBRARY_H_\r | |
17 | \r | |
18 | \r | |
162ed594 | 19 | \r |
20 | /**\r | |
21 | Report status code of type EFI_PROGRESS_CODE by caller ID gEfiCallerIdGuid.\r | |
22 | \r | |
022c6d45 | 23 | @param Value Describes the class/subclass/operation of the\r |
24 | hardware or software entity that the Status Code\r | |
162ed594 | 25 | relates to.\r |
26 | \r | |
27 | **/\r | |
28a00297 | 28 | VOID\r |
29 | CoreReportProgressCode (\r | |
30 | IN EFI_STATUS_CODE_VALUE Value\r | |
23c98c94 | 31 | );\r |
28a00297 | 32 | \r |
28a00297 | 33 | \r |
162ed594 | 34 | /**\r |
35 | Report status code of type EFI_PROGRESS_CODE by caller ID gEfiCallerIdGuid,\r | |
36 | with a handle as additional information.\r | |
28a00297 | 37 | \r |
022c6d45 | 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 | |
162ed594 | 41 | @param Handle Additional information.\r |
28a00297 | 42 | \r |
162ed594 | 43 | **/\r |
28a00297 | 44 | VOID\r |
45 | CoreReportProgressCodeSpecific (\r | |
46 | IN EFI_STATUS_CODE_VALUE Value,\r | |
47 | IN EFI_HANDLE Handle\r | |
23c98c94 | 48 | );\r |
28a00297 | 49 | \r |
28a00297 | 50 | \r |
162ed594 | 51 | /**\r |
52 | Raising to the task priority level of the mutual exclusion\r | |
53 | lock, and then acquires ownership of the lock.\r | |
28a00297 | 54 | \r |
022c6d45 | 55 | @param Lock The lock to acquire\r |
28a00297 | 56 | \r |
162ed594 | 57 | @return Lock owned\r |
28a00297 | 58 | \r |
162ed594 | 59 | **/\r |
28a00297 | 60 | VOID\r |
61 | CoreAcquireLock (\r | |
23c98c94 | 62 | IN EFI_LOCK *Lock\r |
63 | );\r | |
28a00297 | 64 | \r |
28a00297 | 65 | \r |
162ed594 | 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 | |
28a00297 | 72 | \r |
022c6d45 | 73 | @param Lock The EFI_LOCK structure to initialize\r |
28a00297 | 74 | \r |
022c6d45 | 75 | @retval EFI_SUCCESS Lock Owned.\r |
162ed594 | 76 | @retval EFI_ACCESS_DENIED Reentrant Lock Acquisition, Lock not Owned.\r |
28a00297 | 77 | \r |
162ed594 | 78 | **/\r |
28a00297 | 79 | EFI_STATUS\r |
80 | CoreAcquireLockOrFail (\r | |
81 | IN EFI_LOCK *Lock\r | |
23c98c94 | 82 | );\r |
28a00297 | 83 | \r |
28a00297 | 84 | \r |
162ed594 | 85 | /**\r |
86 | Releases ownership of the mutual exclusion lock, and\r | |
87 | restores the previous task priority level.\r | |
28a00297 | 88 | \r |
022c6d45 | 89 | @param Lock The lock to release\r |
28a00297 | 90 | \r |
162ed594 | 91 | @return Lock unowned\r |
28a00297 | 92 | \r |
162ed594 | 93 | **/\r |
28a00297 | 94 | VOID\r |
95 | CoreReleaseLock (\r | |
23c98c94 | 96 | IN EFI_LOCK *Lock\r |
97 | );\r | |
28a00297 | 98 | \r |
28a00297 | 99 | \r |
162ed594 | 100 | /**\r |
101 | Create a protocol notification event and return it.\r | |
28a00297 | 102 | \r |
022c6d45 | 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 | |
28a00297 | 111 | \r |
162ed594 | 112 | @return The EFI_EVENT that has been registered to be signaled when a ProtocolGuid\r |
113 | is added to the system.\r | |
28a00297 | 114 | \r |
162ed594 | 115 | **/\r |
28a00297 | 116 | EFI_EVENT\r |
117 | CoreCreateProtocolNotifyEvent (\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 | |
23c98c94 | 124 | );\r |
28a00297 | 125 | \r |
126 | #endif\r |