3 Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
4 SPDX-License-Identifier: BSD-2-Clause-Patent
19 #include <Library/BaseLib.h>
20 #include <Library/DebugLib.h>
21 #include <Library/UefiDriverEntryPoint.h>
22 #include <Library/UefiBootServicesTableLib.h>
23 #include <Library/MemoryAllocationLib.h>
24 #include <Protocol/Dpc.h>
27 // Internal data structure for managing DPCs. A DPC entry is either on the free
28 // list or on a DPC queue at a specific EFI_TPL.
32 EFI_DPC_PROCEDURE DpcProcedure
;
37 Add a Deferred Procedure Call to the end of the DPC queue.
39 @param This Protocol instance pointer.
40 @param DpcTpl The EFI_TPL that the DPC should be invoked.
41 @param DpcProcedure Pointer to the DPC's function.
42 @param DpcContext Pointer to the DPC's context. Passed to DpcProcedure
43 when DpcProcedure is invoked.
45 @retval EFI_SUCCESS The DPC was queued.
46 @retval EFI_INVALID_PARAMETER DpcTpl is not a valid EFI_TPL.
47 @retval EFI_INVALID_PARAMETER DpcProcedure is NULL.
48 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to
49 add the DPC to the queue.
55 IN EFI_DPC_PROTOCOL
*This
,
57 IN EFI_DPC_PROCEDURE DpcProcedure
,
58 IN VOID
*DpcContext OPTIONAL
62 Dispatch the queue of DPCs. ALL DPCs that have been queued with a DpcTpl
63 value greater than or equal to the current TPL are invoked in the order that
64 they were queued. DPCs with higher DpcTpl values are invoked before DPCs with
67 @param This Protocol instance pointer.
69 @retval EFI_SUCCESS One or more DPCs were invoked.
70 @retval EFI_NOT_FOUND No DPCs were invoked.
76 IN EFI_DPC_PROTOCOL
*This