]> git.proxmox.com Git - mirror_edk2.git/commitdiff
NetworkPkg: Move Dpc.h from MdeModulePkg to NetworkPkg
authorShenglei Zhang <shenglei.zhang@intel.com>
Mon, 12 Aug 2019 08:09:35 +0000 (16:09 +0800)
committerLiming Gao <liming.gao@intel.com>
Thu, 15 Aug 2019 08:42:43 +0000 (16:42 +0800)
Move Dpc.h from MdeModulePkg to NetworkPkg. And remove the
dependency on MdeModulePkg.dec in INFs.
https://bugzilla.tianocore.org/show_bug.cgi?id=1949

Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
MdeModulePkg/Include/Protocol/Dpc.h [deleted file]
NetworkPkg/DpcDxe/DpcDxe.inf
NetworkPkg/Include/Protocol/Dpc.h [new file with mode: 0644]
NetworkPkg/Library/DxeDpcLib/DxeDpcLib.inf

diff --git a/MdeModulePkg/Include/Protocol/Dpc.h b/MdeModulePkg/Include/Protocol/Dpc.h
deleted file mode 100644 (file)
index 1e1d0d3..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/** @file\r
-\r
-  EFI Deferred Procedure Call Protocol.\r
-\r
-Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-\r
-#ifndef __DPC_H__\r
-#define __DPC_H__\r
-\r
-//\r
-// DPC Protocol GUID value\r
-//\r
-#define EFI_DPC_PROTOCOL_GUID \\r
-    { \\r
-      0x480f8ae9, 0xc46, 0x4aa9, { 0xbc, 0x89, 0xdb, 0x9f, 0xba, 0x61, 0x98, 0x6 } \\r
-    }\r
-\r
-//\r
-// Forward reference for pure ANSI compatability\r
-//\r
-typedef struct _EFI_DPC_PROTOCOL  EFI_DPC_PROTOCOL;\r
-\r
-\r
-/**\r
-  Invoke a Deferred Procedure Call.\r
-\r
-  @param  DpcContext           The pointer to the Deferred Procedure Call's context,\r
-                               which is implementation dependent.\r
-\r
-**/\r
-typedef\r
-VOID\r
-(EFIAPI *EFI_DPC_PROCEDURE)(\r
-  IN VOID  *DpcContext\r
-  );\r
-\r
-/**\r
-  Add a Deferred Procedure Call to the end of the DPC queue.\r
-\r
-  @param  This          The protocol instance pointer.\r
-  @param  DpcTpl        The EFI_TPL that the DPC should invoke.\r
-  @param  DpcProcedure  The pointer to the DPC's function.\r
-  @param  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
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_DPC_QUEUE_DPC)(\r
-  IN EFI_DPC_PROTOCOL   *This,\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.\r
-\r
-  DPCs with DpcTpl value greater than the current TPL value are queued, and then DPCs\r
-  with DpcTpl value lower than the current TPL value are queued. All DPCs in the first\r
-  group (higher DpcTpl values) are invoked before DPCs in the second group (lower DpcTpl values).\r
-\r
-  @param  This  Protocol instance pointer.\r
-\r
-  @retval EFI_SUCCESS    One or more DPCs were invoked.\r
-  @retval EFI_NOT_FOUND  No DPCs were invoked.\r
-\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_DPC_DISPATCH_DPC)(\r
-  IN EFI_DPC_PROTOCOL  *This\r
-  );\r
-\r
-///\r
-/// DPC Protocol structure.\r
-///\r
-struct _EFI_DPC_PROTOCOL {\r
-  EFI_DPC_QUEUE_DPC     QueueDpc;\r
-  EFI_DPC_DISPATCH_DPC  DispatchDpc;\r
-};\r
-\r
-///\r
-/// DPC Protocol GUID variable.\r
-///\r
-extern EFI_GUID gEfiDpcProtocolGuid;\r
-\r
-#endif\r
index 1462de28a253f01dfdab537d521983eb8a9635e5..716a04d9824c9e42de4058c8571bd59a6a4a58e9 100644 (file)
@@ -28,7 +28,6 @@
 \r
 [Packages]\r
   MdePkg/MdePkg.dec\r
-  MdeModulePkg/MdeModulePkg.dec\r
   NetworkPkg/NetworkPkg.dec\r
 \r
 [LibraryClasses]\r
diff --git a/NetworkPkg/Include/Protocol/Dpc.h b/NetworkPkg/Include/Protocol/Dpc.h
new file mode 100644 (file)
index 0000000..1e1d0d3
--- /dev/null
@@ -0,0 +1,98 @@
+/** @file\r
+\r
+  EFI Deferred Procedure Call Protocol.\r
+\r
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+\r
+#ifndef __DPC_H__\r
+#define __DPC_H__\r
+\r
+//\r
+// DPC Protocol GUID value\r
+//\r
+#define EFI_DPC_PROTOCOL_GUID \\r
+    { \\r
+      0x480f8ae9, 0xc46, 0x4aa9, { 0xbc, 0x89, 0xdb, 0x9f, 0xba, 0x61, 0x98, 0x6 } \\r
+    }\r
+\r
+//\r
+// Forward reference for pure ANSI compatability\r
+//\r
+typedef struct _EFI_DPC_PROTOCOL  EFI_DPC_PROTOCOL;\r
+\r
+\r
+/**\r
+  Invoke a Deferred Procedure Call.\r
+\r
+  @param  DpcContext           The pointer to the Deferred Procedure Call's context,\r
+                               which is implementation dependent.\r
+\r
+**/\r
+typedef\r
+VOID\r
+(EFIAPI *EFI_DPC_PROCEDURE)(\r
+  IN VOID  *DpcContext\r
+  );\r
+\r
+/**\r
+  Add a Deferred Procedure Call to the end of the DPC queue.\r
+\r
+  @param  This          The protocol instance pointer.\r
+  @param  DpcTpl        The EFI_TPL that the DPC should invoke.\r
+  @param  DpcProcedure  The pointer to the DPC's function.\r
+  @param  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
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_DPC_QUEUE_DPC)(\r
+  IN EFI_DPC_PROTOCOL   *This,\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.\r
+\r
+  DPCs with DpcTpl value greater than the current TPL value are queued, and then DPCs\r
+  with DpcTpl value lower than the current TPL value are queued. All DPCs in the first\r
+  group (higher DpcTpl values) are invoked before DPCs in the second group (lower DpcTpl values).\r
+\r
+  @param  This  Protocol instance pointer.\r
+\r
+  @retval EFI_SUCCESS    One or more DPCs were invoked.\r
+  @retval EFI_NOT_FOUND  No DPCs were invoked.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_DPC_DISPATCH_DPC)(\r
+  IN EFI_DPC_PROTOCOL  *This\r
+  );\r
+\r
+///\r
+/// DPC Protocol structure.\r
+///\r
+struct _EFI_DPC_PROTOCOL {\r
+  EFI_DPC_QUEUE_DPC     QueueDpc;\r
+  EFI_DPC_DISPATCH_DPC  DispatchDpc;\r
+};\r
+\r
+///\r
+/// DPC Protocol GUID variable.\r
+///\r
+extern EFI_GUID gEfiDpcProtocolGuid;\r
+\r
+#endif\r
index 3fb8718f1e33b9e6bba7b8cd60b5d91ae211fd0f..423037090beb621d57d2e17573cf3036681b042e 100644 (file)
@@ -27,7 +27,6 @@
 \r
 [Packages]\r
   MdePkg/MdePkg.dec\r
-  MdeModulePkg/MdeModulePkg.dec\r
   NetworkPkg/NetworkPkg.dec\r
 \r
 [LibraryClasses]\r