scheduler: Remove RunQueue::PeekSecondMaximum()
This commit is contained in:
parent
60e198f2cb
commit
5a69ffc01e
@ -83,8 +83,7 @@ public:
|
||||
|
||||
inline status_t GetInitStatus();
|
||||
|
||||
inline Element* PeekMaximum();
|
||||
inline Element* PeekSecondMaximum();
|
||||
inline Element* PeekMaximum() const;
|
||||
|
||||
inline void PushFront(Element* element, unsigned int priority);
|
||||
inline void PushBack(Element* elementt, unsigned int priority);
|
||||
@ -251,7 +250,7 @@ RUN_QUEUE_CLASS_NAME::GetInitStatus()
|
||||
|
||||
RUN_QUEUE_TEMPLATE_LIST
|
||||
Element*
|
||||
RUN_QUEUE_CLASS_NAME::PeekMaximum()
|
||||
RUN_QUEUE_CLASS_NAME::PeekMaximum() const
|
||||
{
|
||||
int priority = fBitmap.GetHighestSet();
|
||||
if (priority < 0)
|
||||
@ -271,22 +270,6 @@ RUN_QUEUE_CLASS_NAME::PeekMaximum()
|
||||
}
|
||||
|
||||
|
||||
RUN_QUEUE_TEMPLATE_LIST
|
||||
Element*
|
||||
RUN_QUEUE_CLASS_NAME::PeekSecondMaximum()
|
||||
{
|
||||
int priority = fBitmap.GetHighestSet();
|
||||
if (priority < 0)
|
||||
return NULL;
|
||||
|
||||
fBitmap.Clear(priority);
|
||||
Element* element = PeekMaximum();
|
||||
fBitmap.Set(priority);
|
||||
|
||||
return element;
|
||||
}
|
||||
|
||||
|
||||
RUN_QUEUE_TEMPLATE_LIST
|
||||
void
|
||||
RUN_QUEUE_CLASS_NAME::PushFront(Element* element,
|
||||
|
Loading…
Reference in New Issue
Block a user