]>
Commit | Line | Data |
---|---|---|
36ee91ca | 1 | /*++\r |
2 | \r | |
3 | Copyright (c) 2007, Intel Corporation\r | |
4 | All rights reserved. This program and the accompanying materials\r | |
5 | are licensed and made available under the terms and conditions of the BSD License\r | |
6 | which accompanies this distribution. The full text of the license may be found at\r | |
7 | http://opensource.org/licenses/bsd-license.php\r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | Dpc.h\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | EFI Deferred Procedure Call Protocol\r | |
19 | \r | |
20 | Revision 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 | |
39 | typedef 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 | |
49 | typedef\r | |
50 | VOID\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 | |
71 | typedef\r | |
72 | EFI_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 | |
92 | typedef\r | |
93 | EFI_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 | |
101 | typedef struct _EFI_DPC_PROTOCOL {\r | |
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 | |
109 | extern EFI_GUID gEfiDpcProtocolGuid;\r | |
110 | \r | |
111 | #endif\r |