mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
2ce854f515
commit
e676c4d0c6
|
@ -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
|
||||
//
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue