]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Core/Dxe/Library.h
Change field Handle to type IHANDLE to remove the type casting.
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Library.h
CommitLineData
23c98c94 1/** @file\r
504214c4 2 Internal functions shared in DxeCore module.\r
28a00297 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
28a00297 9\r
23c98c94 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
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 Raising to the task priority level of the mutual exclusion\r
21 lock, and then acquires ownership of the lock.\r
28a00297 22\r
022c6d45 23 @param Lock The lock to acquire\r
28a00297 24\r
162ed594 25 @return Lock owned\r
28a00297 26\r
162ed594 27**/\r
28a00297 28VOID\r
29CoreAcquireLock (\r
23c98c94 30 IN EFI_LOCK *Lock\r
31 );\r
28a00297 32\r
28a00297 33\r
162ed594 34/**\r
35 Initialize a basic mutual exclusion lock. Each lock\r
36 provides mutual exclusion access at it's task priority\r
37 level. Since there is no-premption (at any TPL) or\r
38 multiprocessor support, acquiring the lock only consists\r
39 of raising to the locks TPL.\r
28a00297 40\r
022c6d45 41 @param Lock The EFI_LOCK structure to initialize\r
28a00297 42\r
022c6d45 43 @retval EFI_SUCCESS Lock Owned.\r
162ed594 44 @retval EFI_ACCESS_DENIED Reentrant Lock Acquisition, Lock not Owned.\r
28a00297 45\r
162ed594 46**/\r
28a00297 47EFI_STATUS\r
48CoreAcquireLockOrFail (\r
49 IN EFI_LOCK *Lock\r
23c98c94 50 );\r
28a00297 51\r
28a00297 52\r
162ed594 53/**\r
54 Releases ownership of the mutual exclusion lock, and\r
55 restores the previous task priority level.\r
28a00297 56\r
022c6d45 57 @param Lock The lock to release\r
28a00297 58\r
162ed594 59 @return Lock unowned\r
28a00297 60\r
162ed594 61**/\r
28a00297 62VOID\r
63CoreReleaseLock (\r
23c98c94 64 IN EFI_LOCK *Lock\r
65 );\r
28a00297 66\r
28a00297 67\r
162ed594 68/**\r
69 Create a protocol notification event and return it.\r
28a00297 70\r
022c6d45 71 @param ProtocolGuid Protocol to register notification event on.\r
72 @param NotifyTpl Maximum TPL to signal the NotifyFunction.\r
73 @param NotifyFunction EFI notification routine.\r
74 @param NotifyContext Context passed into Event when it is created.\r
75 @param Registration Registration key returned from\r
76 RegisterProtocolNotify().\r
77 @param SignalFlag Boolean value to decide whether kick the event after\r
78 register or not.\r
28a00297 79\r
162ed594 80 @return The EFI_EVENT that has been registered to be signaled when a ProtocolGuid\r
81 is added to the system.\r
28a00297 82\r
162ed594 83**/\r
28a00297 84EFI_EVENT\r
85CoreCreateProtocolNotifyEvent (\r
86 IN EFI_GUID *ProtocolGuid,\r
87 IN EFI_TPL NotifyTpl,\r
88 IN EFI_EVENT_NOTIFY NotifyFunction,\r
89 IN VOID *NotifyContext,\r
90 OUT VOID **Registration,\r
91 IN BOOLEAN SignalFlag\r
23c98c94 92 );\r
28a00297 93\r
94#endif\r