]> git.proxmox.com Git - mirror_edk2.git/blame - NetworkPkg/DpcDxe/Dpc.h
NetworkPkg/DpcDxe: Fix few typos
[mirror_edk2.git] / NetworkPkg / DpcDxe / Dpc.h
CommitLineData
36ee91ca 1/** @file\r
2\r
e5eed7d3 3Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
9d510e61 4SPDX-License-Identifier: BSD-2-Clause-Patent\r
36ee91ca 5\r
6Module Name:\r
7\r
8 Dpc.h\r
9\r
10Abstract:\r
11\r
12\r
13**/\r
14\r
15#ifndef _DPC_H_\r
16#define _DPC_H_\r
17\r
2517435c 18#include <Uefi.h>\r
36ee91ca 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
d80c3d6e 27// Internal data structure for managing DPCs. A DPC entry is either on the free\r
36ee91ca 28// list or on a DPC queue at a specific EFI_TPL.\r
29//\r
30typedef struct {\r
e48e37fc 31 LIST_ENTRY ListEntry;\r
36ee91ca 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
52EFI_STATUS\r
53EFIAPI\r
54DpcQueueDpc (\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
73EFI_STATUS\r
74EFIAPI\r
75DpcDispatchDpc (\r
76 IN EFI_DPC_PROTOCOL *This\r
77 );\r
78\r
79#endif\r
80\r