]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Network/DpcDxe/Dpc.h
Clean Network Driver to include Uefi.h, not PiDxe.h.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / DpcDxe / Dpc.h
CommitLineData
36ee91ca 1/** @file\r
2\r
3Copyright (c) 2007, Intel Corporation\r
4All rights reserved. This program and the accompanying materials\r
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
12Module Name:\r
13\r
14 Dpc.h\r
15\r
16Abstract:\r
17\r
18\r
19**/\r
20\r
21#ifndef _DPC_H_\r
22#define _DPC_H_\r
23\r
2517435c 24#include <Uefi.h>\r
36ee91ca 25#include <Library/BaseLib.h>\r
26#include <Library/DebugLib.h>\r
27#include <Library/UefiDriverEntryPoint.h>\r
28#include <Library/UefiBootServicesTableLib.h>\r
29#include <Library/MemoryAllocationLib.h>\r
30#include <Protocol/Dpc.h>\r
31\r
32//\r
33// Internal data struture for managing DPCs. A DPC entry is either on the free\r
34// list or on a DPC queue at a specific EFI_TPL.\r
35//\r
36typedef struct {\r
e48e37fc 37 LIST_ENTRY ListEntry;\r
36ee91ca 38 EFI_DPC_PROCEDURE DpcProcedure;\r
39 VOID *DpcContext;\r
40} DPC_ENTRY;\r
41\r
42/**\r
43 Add a Deferred Procedure Call to the end of the DPC queue.\r
44\r
45 @param This Protocol instance pointer.\r
46 @param DpcTpl The EFI_TPL that the DPC should be invoked.\r
47 @param DpcProcedure Pointer to the DPC's function.\r
48 @param DpcContext Pointer to the DPC's context. Passed to DpcProcedure\r
49 when DpcProcedure is invoked.\r
50\r
51 @retval EFI_SUCCESS The DPC was queued.\r
52 @retval EFI_INVALID_PARAMETER DpcTpl is not a valid EFI_TPL.\r
53 @retval EFI_INVALID_PARAMETER DpcProcedure is NULL.\r
54 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to\r
55 add the DPC to the queue.\r
56\r
57**/\r
58EFI_STATUS\r
59EFIAPI\r
60DpcQueueDpc (\r
61 IN EFI_DPC_PROTOCOL *This,\r
62 IN EFI_TPL DpcTpl,\r
63 IN EFI_DPC_PROCEDURE DpcProcedure,\r
64 IN VOID *DpcContext OPTIONAL\r
65 );\r
66\r
67/**\r
68 Dispatch the queue of DPCs. ALL DPCs that have been queued with a DpcTpl\r
69 value greater than or equal to the current TPL are invoked in the order that\r
70 they were queued. DPCs with higher DpcTpl values are invoked before DPCs with\r
71 lower DpcTpl values.\r
72\r
73 @param This Protocol instance pointer.\r
74\r
75 @retval EFI_SUCCESS One or more DPCs were invoked.\r
76 @retval EFI_NOT_FOUND No DPCs were invoked.\r
77\r
78**/\r
79EFI_STATUS\r
80EFIAPI\r
81DpcDispatchDpc (\r
82 IN EFI_DPC_PROTOCOL *This\r
83 );\r
84\r
85#endif\r
86\r