]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | \r | |
3 | Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r | |
4 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
5 | \r | |
6 | Module Name:\r | |
7 | \r | |
8 | Dpc.h\r | |
9 | \r | |
10 | Abstract:\r | |
11 | \r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef _DPC_H_\r | |
16 | #define _DPC_H_\r | |
17 | \r | |
18 | #include <Uefi.h>\r | |
19 | #include <Library/BaseLib.h>\r | |
20 | #include <Library/DebugLib.h>\r | |
21 | #include <Library/UefiDriverEntryPoint.h>\r | |
22 | #include <Library/UefiBootServicesTableLib.h>\r | |
23 | #include <Library/MemoryAllocationLib.h>\r | |
24 | #include <Protocol/Dpc.h>\r | |
25 | \r | |
26 | //\r | |
27 | // Internal data structure for managing DPCs. A DPC entry is either on the free\r | |
28 | // list or on a DPC queue at a specific EFI_TPL.\r | |
29 | //\r | |
30 | typedef struct {\r | |
31 | LIST_ENTRY ListEntry;\r | |
32 | EFI_DPC_PROCEDURE DpcProcedure;\r | |
33 | VOID *DpcContext;\r | |
34 | } DPC_ENTRY;\r | |
35 | \r | |
36 | /**\r | |
37 | Add a Deferred Procedure Call to the end of the DPC queue.\r | |
38 | \r | |
39 | @param This Protocol instance pointer.\r | |
40 | @param DpcTpl The EFI_TPL that the DPC should be invoked.\r | |
41 | @param DpcProcedure Pointer to the DPC's function.\r | |
42 | @param DpcContext Pointer to the DPC's context. Passed to DpcProcedure\r | |
43 | when DpcProcedure is invoked.\r | |
44 | \r | |
45 | @retval EFI_SUCCESS The DPC was queued.\r | |
46 | @retval EFI_INVALID_PARAMETER DpcTpl is not a valid EFI_TPL.\r | |
47 | @retval EFI_INVALID_PARAMETER DpcProcedure is NULL.\r | |
48 | @retval EFI_OUT_OF_RESOURCES There are not enough resources available to\r | |
49 | add the DPC to the queue.\r | |
50 | \r | |
51 | **/\r | |
52 | EFI_STATUS\r | |
53 | EFIAPI\r | |
54 | DpcQueueDpc (\r | |
55 | IN EFI_DPC_PROTOCOL *This,\r | |
56 | IN EFI_TPL DpcTpl,\r | |
57 | IN EFI_DPC_PROCEDURE DpcProcedure,\r | |
58 | IN VOID *DpcContext OPTIONAL\r | |
59 | );\r | |
60 | \r | |
61 | /**\r | |
62 | Dispatch the queue of DPCs. ALL DPCs that have been queued with a DpcTpl\r | |
63 | value greater than or equal to the current TPL are invoked in the order that\r | |
64 | they were queued. DPCs with higher DpcTpl values are invoked before DPCs with\r | |
65 | lower DpcTpl values.\r | |
66 | \r | |
67 | @param This Protocol instance pointer.\r | |
68 | \r | |
69 | @retval EFI_SUCCESS One or more DPCs were invoked.\r | |
70 | @retval EFI_NOT_FOUND No DPCs were invoked.\r | |
71 | \r | |
72 | **/\r | |
73 | EFI_STATUS\r | |
74 | EFIAPI\r | |
75 | DpcDispatchDpc (\r | |
76 | IN EFI_DPC_PROTOCOL *This\r | |
77 | );\r | |
78 | \r | |
79 | #endif\r |