diff options
| author | 2018-08-12 12:55:56 -0400 | |
|---|---|---|
| committer | 2018-08-12 12:55:58 -0400 | |
| commit | e850ff63bc51eb8ca2ec7b15167315ee648a4f73 (patch) | |
| tree | 26103fad967b54689685c132dad950dae63c6cf7 /src | |
| parent | thread_queue_list: Make contains() and get_first() const member functions (diff) | |
| download | yuzu-e850ff63bc51eb8ca2ec7b15167315ee648a4f73.tar.gz yuzu-e850ff63bc51eb8ca2ec7b15167315ee648a4f73.tar.xz yuzu-e850ff63bc51eb8ca2ec7b15167315ee648a4f73.zip | |
scheduler: Make HaveReadyThreads() a const member function
This function doesn't modify instance state, so the const qualifier can
be added to it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/scheduler.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/kernel/scheduler.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp index 94065c736..e770b9103 100644 --- a/src/core/hle/kernel/scheduler.cpp +++ b/src/core/hle/kernel/scheduler.cpp | |||
| @@ -25,7 +25,7 @@ Scheduler::~Scheduler() { | |||
| 25 | } | 25 | } |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | bool Scheduler::HaveReadyThreads() { | 28 | bool Scheduler::HaveReadyThreads() const { |
| 29 | std::lock_guard<std::mutex> lock(scheduler_mutex); | 29 | std::lock_guard<std::mutex> lock(scheduler_mutex); |
| 30 | return ready_queue.get_first() != nullptr; | 30 | return ready_queue.get_first() != nullptr; |
| 31 | } | 31 | } |
diff --git a/src/core/hle/kernel/scheduler.h b/src/core/hle/kernel/scheduler.h index 1a4ee8f36..6a61ef64e 100644 --- a/src/core/hle/kernel/scheduler.h +++ b/src/core/hle/kernel/scheduler.h | |||
| @@ -21,7 +21,7 @@ public: | |||
| 21 | ~Scheduler(); | 21 | ~Scheduler(); |
| 22 | 22 | ||
| 23 | /// Returns whether there are any threads that are ready to run. | 23 | /// Returns whether there are any threads that are ready to run. |
| 24 | bool HaveReadyThreads(); | 24 | bool HaveReadyThreads() const; |
| 25 | 25 | ||
| 26 | /// Reschedules to the next available thread (call after current thread is suspended) | 26 | /// Reschedules to the next available thread (call after current thread is suspended) |
| 27 | void Reschedule(); | 27 | void Reschedule(); |