scheduler: Remove RunQueue::PeekSecondMaximum()

This commit is contained in:
Pawel Dziepak
2013-12-23 03:51:02 +01:00
parent 60e198f2cb
commit 5a69ffc01e
+2 -19
View File
@@ -83,8 +83,7 @@ public:
inline status_t GetInitStatus(); inline status_t GetInitStatus();
inline Element* PeekMaximum(); inline Element* PeekMaximum() const;
inline Element* PeekSecondMaximum();
inline void PushFront(Element* element, unsigned int priority); inline void PushFront(Element* element, unsigned int priority);
inline void PushBack(Element* elementt, unsigned int priority); inline void PushBack(Element* elementt, unsigned int priority);
@@ -251,7 +250,7 @@ RUN_QUEUE_CLASS_NAME::GetInitStatus()
RUN_QUEUE_TEMPLATE_LIST RUN_QUEUE_TEMPLATE_LIST
Element* Element*
RUN_QUEUE_CLASS_NAME::PeekMaximum() RUN_QUEUE_CLASS_NAME::PeekMaximum() const
{ {
int priority = fBitmap.GetHighestSet(); int priority = fBitmap.GetHighestSet();
if (priority < 0) 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 RUN_QUEUE_TEMPLATE_LIST
void void
RUN_QUEUE_CLASS_NAME::PushFront(Element* element, RUN_QUEUE_CLASS_NAME::PushFront(Element* element,