diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-11-20 05:42:23 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-11-20 05:42:23 +0000 |
commit | 36ee91ca3661d3d020a7841aacbf858d885c4728 (patch) | |
tree | 418e7a4d4a84d86a78d4b260acab20877be5bd45 /MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c | |
parent | 04e12c21476db29e8f92030ed00122fa4e1e56cc (diff) | |
download | edk2-36ee91ca3661d3d020a7841aacbf858d885c4728.zip edk2-36ee91ca3661d3d020a7841aacbf858d885c4728.tar.gz edk2-36ee91ca3661d3d020a7841aacbf858d885c4728.tar.bz2 |
1. Add DPC protocol and DpcLib library in MdeModulePkg.
2. Add DpcDxe module and DxeDpcLib module in MdeModulePkg
3. Port network stack module to use DPC.
4. Use MIN, and MAX defined in MdePkg to replace NET_MIN and NET_MAX.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4307 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c')
-rw-r--r-- | MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c b/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c index 58bc722..af2e082 100644 --- a/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c +++ b/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c @@ -1,6 +1,6 @@ /** @file
-Copyright (c) 2006, Intel Corporation
+Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -178,11 +178,6 @@ ArpCreateService ( }
//
- // Init the lock.
- //
- NET_LOCK_INIT (&ArpService->Lock);
-
- //
// Init the lists.
//
NetListInit (&ArpService->ChildrenList);
@@ -506,6 +501,7 @@ ArpServiceBindingCreateChild ( ARP_SERVICE_DATA *ArpService;
ARP_INSTANCE_DATA *Instance;
VOID *Mnp;
+ EFI_TPL OldTpl;
if ((This == NULL) || (ChildHandle == NULL)) {
return EFI_INVALID_PARAMETER;
@@ -564,11 +560,7 @@ ArpServiceBindingCreateChild ( goto ERROR;
}
- if (EFI_ERROR (NET_TRYLOCK (&ArpService->Lock))) {
-
- Status = EFI_ACCESS_DENIED;
- goto ERROR;
- }
+ OldTpl = NET_RAISE_TPL (NET_TPL_LOCK);
//
// Insert the instance into children list managed by the arp service context data.
@@ -576,7 +568,7 @@ ArpServiceBindingCreateChild ( NetListInsertTail (&ArpService->ChildrenList, &Instance->List);
ArpService->ChildrenNumber++;
- NET_UNLOCK (&ArpService->Lock);
+ NET_RESTORE_TPL (OldTpl);
ERROR:
@@ -633,6 +625,7 @@ ArpServiceBindingDestroyChild ( ARP_SERVICE_DATA *ArpService;
ARP_INSTANCE_DATA *Instance;
EFI_ARP_PROTOCOL *Arp;
+ EFI_TPL OldTpl;
if ((This == NULL) || (ChildHandle == NULL)) {
return EFI_INVALID_PARAMETER;
@@ -693,10 +686,7 @@ ArpServiceBindingDestroyChild ( return Status;
}
- if (EFI_ERROR (NET_TRYLOCK (&ArpService->Lock))) {
- Instance->Destroyed = FALSE;
- return EFI_ACCESS_DENIED;
- }
+ OldTpl = NET_RAISE_TPL (NET_TPL_LOCK);
if (Instance->Configured) {
//
@@ -716,7 +706,7 @@ ArpServiceBindingDestroyChild ( NetListRemoveEntry (&Instance->List);
ArpService->ChildrenNumber--;
- NET_UNLOCK (&ArpService->Lock);
+ NET_RESTORE_TPL (OldTpl);
NetFreePool (Instance);
|