TianoCore EDK2 master
Loading...
Searching...
No Matches
DpcLib.c
Go to the documentation of this file.
1
8#include <Uefi.h>
9#include <Library/DebugLib.h>
11#include <Protocol/Dpc.h>
12
13//
14// Pointer to the DPC Protocol
15//
17
28EFIAPI
30 IN EFI_HANDLE ImageHandle,
31 IN EFI_SYSTEM_TABLE *SystemTable
32 )
33{
34 EFI_STATUS Status;
35
36 //
37 // Locate the EFI_DPC_PROTOCOL in the handle database
38 //
39 Status = gBS->LocateProtocol (&gEfiDpcProtocolGuid, NULL, (VOID **)&mDpc);
40 ASSERT_EFI_ERROR (Status);
41
42 return Status;
43}
44
61EFIAPI
63 IN EFI_TPL DpcTpl,
64 IN EFI_DPC_PROCEDURE DpcProcedure,
65 IN VOID *DpcContext OPTIONAL
66 )
67{
68 //
69 // Call the EFI_DPC_PROTOCOL to queue the DPC
70 //
71 return mDpc->QueueDpc (mDpc, DpcTpl, DpcProcedure, DpcContext);
72}
73
85EFIAPI
87 VOID
88 )
89{
90 //
91 // Call the EFI_DPC_PROTOCOL to dispatch previously queued DPCs
92 //
93 return mDpc->DispatchDpc (mDpc);
94}
EFI_STATUS EFIAPI DpcLibConstructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition: DpcLib.c:29
EFI_STATUS EFIAPI DispatchDpc(VOID)
Definition: DpcLib.c:86
EFI_STATUS EFIAPI QueueDpc(IN EFI_TPL DpcTpl, IN EFI_DPC_PROCEDURE DpcProcedure, IN VOID *DpcContext OPTIONAL)
Definition: DpcLib.c:62
VOID(EFIAPI * EFI_DPC_PROCEDURE)(IN VOID *DpcContext)
Definition: Dpc.h:35
EFI_GUID gEfiDpcProtocolGuid
#define NULL
Definition: Base.h:319
#define IN
Definition: Base.h:279
#define ASSERT_EFI_ERROR(StatusParameter)
Definition: DebugLib.h:462
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
UINTN EFI_TPL
Definition: UefiBaseType.h:41
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
EFI_BOOT_SERVICES * gBS