summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-17 13:35:14 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-17 13:35:14 +0000
commite676c4d0c6d21d1ac277598c7f56102c9bc00375 (patch)
tree863cbbe189fb357608f5b1f65f4cfb132772300a /MdeModulePkg
parent2ce854f51511314a537c38c7ec4adfd19f4ccdb7 (diff)
downloadedk2-platforms-e676c4d0c6d21d1ac277598c7f56102c9bc00375.tar.xz
Apply HighBitSet() in MDE baseLib to retire the internal function CoreHighestSetBit().
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5920 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Core/Dxe/Event.h14
-rw-r--r--MdeModulePkg/Core/Dxe/Event/Tpl.c34
2 files changed, 2 insertions, 46 deletions
diff --git a/MdeModulePkg/Core/Dxe/Event.h b/MdeModulePkg/Core/Dxe/Event.h
index a3b0d67ff7..1709290a9f 100644
--- a/MdeModulePkg/Core/Dxe/Event.h
+++ b/MdeModulePkg/Core/Dxe/Event.h
@@ -84,20 +84,6 @@ CoreDispatchEventNotifies (
-/**
- Return the highest set bit.
-
- @param Number The value to check
-
- @return Bit position of the highest set bit
-
-**/
-UINTN
-CoreHighestSetBit (
- IN UINTN Number
- );
-
-
//
// Exported functions
//
diff --git a/MdeModulePkg/Core/Dxe/Event/Tpl.c b/MdeModulePkg/Core/Dxe/Event/Tpl.c
index 5eb4628cb1..43bc8add36 100644
--- a/MdeModulePkg/Core/Dxe/Event/Tpl.c
+++ b/MdeModulePkg/Core/Dxe/Event/Tpl.c
@@ -35,35 +35,6 @@ CoreSetInterruptState (
}
}
-//
-// Return the highest set bit
-//
-
-/**
- Return the highest set bit.
-
- @param Number The value to check
-
- @return Bit position of the highest set bit
-
-**/
-UINTN
-CoreHighestSetBit (
- IN UINTN Number
- )
-{
- UINTN Msb;
-
- Msb = 31;
- while ((Msb > 0) && ((Number & (UINTN)(1 << Msb)) == 0)) {
- Msb--;
- }
-
- return Msb;
-}
-
-
-
/**
Raise the task priority level to the new level.
@@ -135,9 +106,8 @@ CoreRestoreTpl (
//
// Dispatch any pending events
//
-
- while ((-2 << NewTpl) & gEventPending) {
- gEfiCurrentTpl = CoreHighestSetBit (gEventPending);
+ while (((-2 << NewTpl) & gEventPending) != 0) {
+ gEfiCurrentTpl = HighBitSet64 (gEventPending);
if (gEfiCurrentTpl < TPL_HIGH_LEVEL) {
CoreSetInterruptState (TRUE);
}