]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdeModulePkg/Include/Protocol/Dpc.h
Patch from open source community for CryptoPkg to allow it to build for ARM using...
[mirror_edk2.git] / MdeModulePkg / Include / Protocol / Dpc.h
... / ...
CommitLineData
1/** @file\r
2\r
3 EFI Deferred Procedure Call Protocol.\r
4\r
5Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
6This program and the accompanying materials are licensed and made available under \r
7the terms and conditions of the BSD License that accompanies this distribution. \r
8The full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php. \r
10\r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16\r
17#ifndef __DPC_H__\r
18#define __DPC_H__\r
19\r
20//\r
21// DPC Protocol GUID value\r
22//\r
23#define EFI_DPC_PROTOCOL_GUID \\r
24 { \\r
25 0x480f8ae9, 0xc46, 0x4aa9, { 0xbc, 0x89, 0xdb, 0x9f, 0xba, 0x61, 0x98, 0x6 } \\r
26 }\r
27\r
28//\r
29// Forward reference for pure ANSI compatability\r
30//\r
31typedef struct _EFI_DPC_PROTOCOL EFI_DPC_PROTOCOL;\r
32\r
33\r
34/**\r
35 Invoke a Deferred Procedure Call.\r
36\r
37 @param DpcContext The pointer to the Deferred Procedure Call's context,\r
38 which is implementation dependent.\r
39\r
40**/\r
41typedef\r
42VOID\r
43(EFIAPI *EFI_DPC_PROCEDURE)(\r
44 IN VOID *DpcContext\r
45 );\r
46\r
47/**\r
48 Add a Deferred Procedure Call to the end of the DPC queue.\r
49\r
50 @param This The protocol instance pointer.\r
51 @param DpcTpl The EFI_TPL that the DPC should invoke.\r
52 @param DpcProcedure The pointer to the DPC's function.\r
53 @param DpcContext The pointer to the DPC's context. Passed to DpcProcedure\r
54 when DpcProcedure is invoked.\r
55\r
56 @retval EFI_SUCCESS The DPC was queued.\r
57 @retval EFI_INVALID_PARAMETER DpcTpl is not a valid EFI_TPL.\r
58 @retval EFI_INVALID_PARAMETER DpcProcedure is NULL.\r
59 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to\r
60 add the DPC to the queue.\r
61\r
62**/\r
63typedef\r
64EFI_STATUS\r
65(EFIAPI *EFI_DPC_QUEUE_DPC)(\r
66 IN EFI_DPC_PROTOCOL *This,\r
67 IN EFI_TPL DpcTpl,\r
68 IN EFI_DPC_PROCEDURE DpcProcedure,\r
69 IN VOID *DpcContext OPTIONAL\r
70 );\r
71\r
72/**\r
73 Dispatch the queue of DPCs. \r
74 \r
75 DPCs with DpcTpl value greater than the current TPL value are queued, and then DPCs\r
76 with DpcTpl value lower than the current TPL value are queued. All DPCs in the first \r
77 group (higher DpcTpl values) are invoked before DPCs in the second group (lower DpcTpl values). \r
78\r
79 @param This Protocol instance pointer.\r
80\r
81 @retval EFI_SUCCESS One or more DPCs were invoked.\r
82 @retval EFI_NOT_FOUND No DPCs were invoked.\r
83\r
84**/\r
85typedef\r
86EFI_STATUS\r
87(EFIAPI *EFI_DPC_DISPATCH_DPC)(\r
88 IN EFI_DPC_PROTOCOL *This\r
89 );\r
90\r
91///\r
92/// DPC Protocol structure.\r
93///\r
94struct _EFI_DPC_PROTOCOL {\r
95 EFI_DPC_QUEUE_DPC QueueDpc;\r
96 EFI_DPC_DISPATCH_DPC DispatchDpc;\r
97};\r
98\r
99///\r
100/// DPC Protocol GUID variable.\r
101///\r
102extern EFI_GUID gEfiDpcProtocolGuid;\r
103\r
104#endif\r