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