]> git.proxmox.com Git - mirror_edk2.git/blob - NetworkPkg/Include/Library/DpcLib.h
NetworkPkg: Move Network library header file from MdeModulePkg to NetworkPkg
[mirror_edk2.git] / NetworkPkg / Include / Library / DpcLib.h
1 /** @file
2 DpcLib.h.
3
4 Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef _DPC_LIB_H_
10 #define _DPC_LIB_H_
11
12 #include <Protocol/Dpc.h>
13
14 /**
15 Add a Deferred Procedure Call to the end of the DPC queue.
16
17 @param[in] DpcTpl The EFI_TPL that the DPC should invoke.
18 @param[in] DpcProcedure The pointer to the DPC's function.
19 @param[in] DpcContext The pointer to the DPC's context. Passed to DpcProcedure
20 when DpcProcedure is invoked.
21
22 @retval EFI_SUCCESS The DPC was queued.
23 @retval EFI_INVALID_PARAMETER DpcTpl is not a valid EFI_TPL.
24 @retval EFI_INVALID_PARAMETER DpcProcedure is NULL.
25 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to
26 add the DPC to the queue.
27
28 **/
29 EFI_STATUS
30 EFIAPI
31 QueueDpc (
32 IN EFI_TPL DpcTpl,
33 IN EFI_DPC_PROCEDURE DpcProcedure,
34 IN VOID *DpcContext OPTIONAL
35 );
36
37 /**
38 Dispatch the queue of DPCs. All DPCs that have been queued with a DpcTpl
39 value greater than or equal to the current TPL are invoked in the order that
40 they were queued. DPCs with higher DpcTpl values are invoked before DPCs with
41 lower DpcTpl values.
42
43 @retval EFI_SUCCESS One or more DPCs were invoked.
44 @retval EFI_NOT_FOUND No DPCs were invoked.
45
46 **/
47 EFI_STATUS
48 EFIAPI
49 DispatchDpc (
50 VOID
51 );
52
53 #endif