mirror of
https://github.com/PabloMK7/citra.git
synced 2024-11-16 12:03:25 +01:00
kernel/wait_object: Make GetHighestPriorityReadyThread() a const member function
This doesn't actually modify internal state of a wait object, so it can be const qualified.
This commit is contained in:
parent
28df11dba2
commit
882f647760
@ -32,7 +32,7 @@ void WaitObject::RemoveWaitingThread(Thread* thread) {
|
|||||||
waiting_threads.erase(itr);
|
waiting_threads.erase(itr);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Thread> WaitObject::GetHighestPriorityReadyThread() {
|
std::shared_ptr<Thread> WaitObject::GetHighestPriorityReadyThread() const {
|
||||||
Thread* candidate = nullptr;
|
Thread* candidate = nullptr;
|
||||||
u32 candidate_priority = ThreadPrioLowest + 1;
|
u32 candidate_priority = ThreadPrioLowest + 1;
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ public:
|
|||||||
virtual void WakeupAllWaitingThreads();
|
virtual void WakeupAllWaitingThreads();
|
||||||
|
|
||||||
/// Obtains the highest priority thread that is ready to run from this object's waiting list.
|
/// Obtains the highest priority thread that is ready to run from this object's waiting list.
|
||||||
std::shared_ptr<Thread> GetHighestPriorityReadyThread();
|
std::shared_ptr<Thread> GetHighestPriorityReadyThread() const;
|
||||||
|
|
||||||
/// Get a const reference to the waiting threads list for debug use
|
/// Get a const reference to the waiting threads list for debug use
|
||||||
const std::vector<std::shared_ptr<Thread>>& GetWaitingThreads() const;
|
const std::vector<std::shared_ptr<Thread>>& GetWaitingThreads() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user