summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/Dxe/Image
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-17 02:20:24 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-17 02:20:24 +0000
commit46fee0d7b69f6f7ded0e8269670c34f5a96858da (patch)
treeb57a15d7f516248e6d987e3aa2a993de4992d3bc /MdeModulePkg/Core/Dxe/Image
parenta04ad3f01fe97649f3ff7097443f08b7a597d797 (diff)
downloadedk2-platforms-46fee0d7b69f6f7ded0e8269670c34f5a96858da.tar.xz
Remove the unnecessary spin_lock protection around CoreUnloadImage. There is almost zero possibility for this reentrancy issue here. With this change, we also keep EDK 2 and EDK core's CoreUnloadImage consistent with each other.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5906 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/Dxe/Image')
-rw-r--r--MdeModulePkg/Core/Dxe/Image/Image.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c
index 4826a959f8..2185883109 100644
--- a/MdeModulePkg/Core/Dxe/Image/Image.c
+++ b/MdeModulePkg/Core/Dxe/Image/Image.c
@@ -17,8 +17,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
// Module Globals
//
-SPIN_LOCK mUnloadImageLock;
-
LOADED_IMAGE_PRIVATE_DATA *mCurrentImage = NULL;
LOAD_PE32_IMAGE_PRIVATE_DATA mLoadPe32PrivateData = {
@@ -140,11 +138,6 @@ CoreInitializeImageServices (
mCurrentImage = Image;
//
- // Initialize spin lock
- //
- InitializeSpinLock (&mUnloadImageLock);
-
- //
// Fill in DXE globals
//
gDxeCoreImageHandle = Image->Handle;
@@ -1366,14 +1359,6 @@ CoreUnloadImage (
EFI_STATUS Status;
LOADED_IMAGE_PRIVATE_DATA *Image;
- //
- // Prevent possible reentrance to this function
- // for the same ImageHandle
- //
- if (!AcquireSpinLockOrFail (&mUnloadImageLock)) {
- return EFI_UNSUPPORTED;
- }
-
Image = CoreLoadedImageInfo (ImageHandle);
if (Image == NULL ) {
//
@@ -1408,7 +1393,6 @@ CoreUnloadImage (
}
Done:
- ReleaseSpinLock (&mUnloadImageLock);
return Status;
}