]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Include/Library/DpcLib.h
NetworkPkg: Move Network library header file from MdeModulePkg to NetworkPkg
[mirror_edk2.git] / NetworkPkg / Include / Library / DpcLib.h
diff --git a/NetworkPkg/Include/Library/DpcLib.h b/NetworkPkg/Include/Library/DpcLib.h
new file mode 100644 (file)
index 0000000..a70af1d
--- /dev/null
@@ -0,0 +1,53 @@
+/** @file\r
+  DpcLib.h.\r
+\r
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#ifndef _DPC_LIB_H_\r
+#define _DPC_LIB_H_\r
+\r
+#include <Protocol/Dpc.h>\r
+\r
+/**\r
+  Add a Deferred Procedure Call to the end of the DPC queue.\r
+\r
+  @param[in]  DpcTpl        The EFI_TPL that the DPC should invoke.\r
+  @param[in]  DpcProcedure  The pointer to the DPC's function.\r
+  @param[in]  DpcContext    The pointer to the DPC's context.  Passed to DpcProcedure\r
+                            when DpcProcedure is invoked.\r
+\r
+  @retval EFI_SUCCESS            The DPC was queued.\r
+  @retval EFI_INVALID_PARAMETER  DpcTpl is not a valid EFI_TPL.\r
+  @retval EFI_INVALID_PARAMETER  DpcProcedure is NULL.\r
+  @retval EFI_OUT_OF_RESOURCES   There are not enough resources available to\r
+                                 add the DPC to the queue.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+QueueDpc (\r
+  IN EFI_TPL            DpcTpl,\r
+  IN EFI_DPC_PROCEDURE  DpcProcedure,\r
+  IN VOID               *DpcContext    OPTIONAL\r
+  );\r
+\r
+/**\r
+  Dispatch the queue of DPCs. All DPCs that have been queued with a DpcTpl\r
+  value greater than or equal to the current TPL are invoked in the order that\r
+  they were queued.  DPCs with higher DpcTpl values are invoked before DPCs with\r
+  lower DpcTpl values.\r
+\r
+  @retval EFI_SUCCESS    One or more DPCs were invoked.\r
+  @retval EFI_NOT_FOUND  No DPCs were invoked.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+DispatchDpc (\r
+  VOID\r
+  );\r
+\r
+#endif\r