]> git.proxmox.com Git - mirror_edk2.git/blame - NetworkPkg/Include/Protocol/Dpc.h
NetworkPkg: Apply uncrustify changes
[mirror_edk2.git] / NetworkPkg / Include / Protocol / Dpc.h
CommitLineData
5f597758 1/** @file\r
36ee91ca 2\r
64a80549 3 EFI Deferred Procedure Call Protocol.\r
5f597758 4\r
d1102dba 5Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
9d510e61 6SPDX-License-Identifier: BSD-2-Clause-Patent\r
36ee91ca 7\r
5f597758 8**/\r
36ee91ca 9\r
36ee91ca 10#ifndef __DPC_H__\r
11#define __DPC_H__\r
12\r
13//\r
14// DPC Protocol GUID value\r
15//\r
16#define EFI_DPC_PROTOCOL_GUID \\r
17 { \\r
18 0x480f8ae9, 0xc46, 0x4aa9, { 0xbc, 0x89, 0xdb, 0x9f, 0xba, 0x61, 0x98, 0x6 } \\r
19 }\r
20\r
21//\r
d80c3d6e 22// Forward reference for pure ANSI compatibility\r
36ee91ca 23//\r
d1050b9d 24typedef struct _EFI_DPC_PROTOCOL EFI_DPC_PROTOCOL;\r
36ee91ca 25\r
26/**\r
27 Invoke a Deferred Procedure Call.\r
28\r
64a80549 29 @param DpcContext The pointer to the Deferred Procedure Call's context,\r
36ee91ca 30 which is implementation dependent.\r
31\r
32**/\r
33typedef\r
34VOID\r
7d839888 35(EFIAPI *EFI_DPC_PROCEDURE)(\r
36ee91ca 36 IN VOID *DpcContext\r
37 );\r
38\r
39/**\r
40 Add a Deferred Procedure Call to the end of the DPC queue.\r
41\r
64a80549 42 @param This The protocol instance pointer.\r
e9b67286 43 @param DpcTpl The EFI_TPL that the DPC should invoke.\r
64a80549 44 @param DpcProcedure The pointer to the DPC's function.\r
45 @param DpcContext The pointer to the DPC's context. Passed to DpcProcedure\r
36ee91ca 46 when DpcProcedure is invoked.\r
47\r
48 @retval EFI_SUCCESS The DPC was queued.\r
49 @retval EFI_INVALID_PARAMETER DpcTpl is not a valid EFI_TPL.\r
50 @retval EFI_INVALID_PARAMETER DpcProcedure is NULL.\r
51 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to\r
52 add the DPC to the queue.\r
53\r
54**/\r
55typedef\r
56EFI_STATUS\r
7d839888 57(EFIAPI *EFI_DPC_QUEUE_DPC)(\r
36ee91ca 58 IN EFI_DPC_PROTOCOL *This,\r
59 IN EFI_TPL DpcTpl,\r
60 IN EFI_DPC_PROCEDURE DpcProcedure,\r
61 IN VOID *DpcContext OPTIONAL\r
62 );\r
63\r
64/**\r
d1102dba
LG
65 Dispatch the queue of DPCs.\r
66\r
e9b67286 67 DPCs with DpcTpl value greater than the current TPL value are queued, and then DPCs\r
d1102dba
LG
68 with DpcTpl value lower than the current TPL value are queued. All DPCs in the first\r
69 group (higher DpcTpl values) are invoked before DPCs in the second group (lower DpcTpl values).\r
36ee91ca 70\r
71 @param This Protocol instance pointer.\r
72\r
73 @retval EFI_SUCCESS One or more DPCs were invoked.\r
74 @retval EFI_NOT_FOUND No DPCs were invoked.\r
75\r
76**/\r
77typedef\r
78EFI_STATUS\r
7d839888 79(EFIAPI *EFI_DPC_DISPATCH_DPC)(\r
36ee91ca 80 IN EFI_DPC_PROTOCOL *This\r
81 );\r
82\r
c351b60d 83///\r
64a80549 84/// DPC Protocol structure.\r
c351b60d 85///\r
c93ce648 86struct _EFI_DPC_PROTOCOL {\r
d1050b9d
MK
87 EFI_DPC_QUEUE_DPC QueueDpc;\r
88 EFI_DPC_DISPATCH_DPC DispatchDpc;\r
36ee91ca 89};\r
90\r
c351b60d 91///\r
64a80549 92/// DPC Protocol GUID variable.\r
c351b60d 93///\r
d1050b9d 94extern EFI_GUID gEfiDpcProtocolGuid;\r
36ee91ca 95\r
96#endif\r