-\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 be invoked.\r
- @param[in] DpcProcedure Pointer to the DPC's function.\r
- @param[in] DpcContext 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, or DpcProcedure\r
- 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
-NetLibQueueDpc (\r
- IN EFI_TPL DpcTpl,\r
- IN EFI_DPC_PROCEDURE DpcProcedure,\r
- IN VOID *DpcContext OPTIONAL\r
- )\r
-{\r
- return mDpc->QueueDpc (mDpc, DpcTpl, DpcProcedure, DpcContext);\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
-NetLibDispatchDpc (\r
- VOID\r
- )\r
-{\r
- return mDpc->DispatchDpc(mDpc);\r
-}\r
-\r
-/**\r
- The constructor function caches the pointer to DPC protocol.\r
-\r
- The constructor function locates DPC protocol from protocol database.\r
- It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.\r
-\r
- @param[in] ImageHandle The firmware allocated handle for the EFI image.\r
- @param[in] SystemTable A pointer to the EFI System Table.\r
-\r
- @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-NetLibConstructor (\r
- IN EFI_HANDLE ImageHandle,\r
- IN EFI_SYSTEM_TABLE *SystemTable\r
- )\r
-{\r
- EFI_STATUS Status;\r
-\r
- Status = gBS->LocateProtocol (&gEfiDpcProtocolGuid, NULL, (VOID**) &mDpc);\r
- ASSERT_EFI_ERROR (Status);\r
- ASSERT (mDpc != NULL);\r
-\r
- return Status;\r
-}\r