]>
Commit | Line | Data |
---|---|---|
5f597758 | 1 | /** @file\r |
36ee91ca | 2 | \r |
5f597758 LG |
3 | EFI Deferred Procedure Call Protocol\r |
4 | \r | |
5 | Copyright (c) 2007 - 2008, Intel Corporation\r | |
36ee91ca | 6 | All rights reserved. This program and the accompanying materials\r |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
5f597758 | 14 | **/\r |
36ee91ca | 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 | |
31 | typedef 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 Pointer to the Deferred Procedure Call's context,\r | |
38 | which is implementation dependent.\r | |
39 | \r | |
40 | **/\r | |
41 | typedef\r | |
42 | VOID\r | |
7d839888 | 43 | (EFIAPI *EFI_DPC_PROCEDURE)(\r |
36ee91ca | 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 Protocol instance pointer.\r | |
51 | @param DpcTpl The EFI_TPL that the DPC should be invoked.\r | |
52 | @param DpcProcedure Pointer to the DPC's function.\r | |
53 | @param DpcContext 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 | |
63 | typedef\r | |
64 | EFI_STATUS\r | |
7d839888 | 65 | (EFIAPI *EFI_DPC_QUEUE_DPC)(\r |
36ee91ca | 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. ALL DPCs that have been queued with a DpcTpl\r | |
74 | value greater than or equal to the current TPL are invoked in the order that\r | |
75 | they were queued. DPCs with higher DpcTpl values are invoked before DPCs with\r | |
76 | lower DpcTpl values.\r | |
77 | \r | |
78 | @param This Protocol instance pointer.\r | |
79 | \r | |
80 | @retval EFI_SUCCESS One or more DPCs were invoked.\r | |
81 | @retval EFI_NOT_FOUND No DPCs were invoked.\r | |
82 | \r | |
83 | **/\r | |
84 | typedef\r | |
85 | EFI_STATUS\r | |
7d839888 | 86 | (EFIAPI *EFI_DPC_DISPATCH_DPC)(\r |
36ee91ca | 87 | IN EFI_DPC_PROTOCOL *This\r |
88 | );\r | |
89 | \r | |
90 | //\r | |
91 | // DPC Protocol structure\r | |
92 | //\r | |
c93ce648 | 93 | struct _EFI_DPC_PROTOCOL {\r |
36ee91ca | 94 | EFI_DPC_QUEUE_DPC QueueDpc;\r |
95 | EFI_DPC_DISPATCH_DPC DispatchDpc;\r | |
96 | };\r | |
97 | \r | |
98 | //\r | |
99 | // DPC Protocol GUID variable\r | |
100 | //\r | |
101 | extern EFI_GUID gEfiDpcProtocolGuid;\r | |
102 | \r | |
103 | #endif\r |