]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Protocol/Dpc.h
modify coding style to pass ecc tool and provide comments that complied with Doxgen.
[mirror_edk2.git] / MdeModulePkg / Include / Protocol / Dpc.h
CommitLineData
36ee91ca 1/*++\r
2\r
3Copyright (c) 2007, Intel Corporation\r
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 __DPC_H__\r
26#define __DPC_H__\r
27\r
28//\r
29// DPC Protocol GUID value\r
30//\r
31#define EFI_DPC_PROTOCOL_GUID \\r
32 { \\r
33 0x480f8ae9, 0xc46, 0x4aa9, { 0xbc, 0x89, 0xdb, 0x9f, 0xba, 0x61, 0x98, 0x6 } \\r
34 }\r
35\r
36//\r
37// Forward reference for pure ANSI compatability\r
38//\r
39typedef struct _EFI_DPC_PROTOCOL EFI_DPC_PROTOCOL;\r
40\r
41\r
42/**\r
43 Invoke a Deferred Procedure Call.\r
44\r
45 @param DpcContext Pointer to the Deferred Procedure Call's context,\r
46 which is implementation dependent.\r
47\r
48**/\r
49typedef\r
50VOID\r
51(EFIAPI *EFI_DPC_PROCEDURE) (\r
52 IN VOID *DpcContext\r
53 );\r
54\r
55/**\r
56 Add a Deferred Procedure Call to the end of the DPC queue.\r
57\r
58 @param This Protocol instance pointer.\r
59 @param DpcTpl The EFI_TPL that the DPC should be invoked.\r
60 @param DpcProcedure Pointer to the DPC's function.\r
61 @param DpcContext Pointer to the DPC's context. Passed to DpcProcedure\r
62 when DpcProcedure is invoked.\r
63\r
64 @retval EFI_SUCCESS The DPC was queued.\r
65 @retval EFI_INVALID_PARAMETER DpcTpl is not a valid EFI_TPL.\r
66 @retval EFI_INVALID_PARAMETER DpcProcedure is NULL.\r
67 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to\r
68 add the DPC to the queue.\r
69\r
70**/\r
71typedef\r
72EFI_STATUS\r
73(EFIAPI *EFI_DPC_QUEUE_DPC) (\r
74 IN EFI_DPC_PROTOCOL *This,\r
75 IN EFI_TPL DpcTpl,\r
76 IN EFI_DPC_PROCEDURE DpcProcedure,\r
77 IN VOID *DpcContext OPTIONAL\r
78 );\r
79\r
80/**\r
81 Dispatch the queue of DPCs. ALL DPCs that have been queued with a DpcTpl\r
82 value greater than or equal to the current TPL are invoked in the order that\r
83 they were queued. DPCs with higher DpcTpl values are invoked before DPCs with\r
84 lower DpcTpl values.\r
85\r
86 @param This Protocol instance pointer.\r
87\r
88 @retval EFI_SUCCESS One or more DPCs were invoked.\r
89 @retval EFI_NOT_FOUND No DPCs were invoked.\r
90\r
91**/\r
92typedef\r
93EFI_STATUS\r
94(EFIAPI *EFI_DPC_DISPATCH_DPC) (\r
95 IN EFI_DPC_PROTOCOL *This\r
96 );\r
97\r
98//\r
99// DPC Protocol structure\r
100//\r
c93ce648 101struct _EFI_DPC_PROTOCOL {\r
36ee91ca 102 EFI_DPC_QUEUE_DPC QueueDpc;\r
103 EFI_DPC_DISPATCH_DPC DispatchDpc;\r
104};\r
105\r
106//\r
107// DPC Protocol GUID variable\r
108//\r
109extern EFI_GUID gEfiDpcProtocolGuid;\r
110\r
111#endif\r