summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-01-21 00:20:47 +0100
committerbunnei <bunneidev@gmail.com>2015-01-22 02:48:30 +0100
commitf09806aed24b2f7de7d969cbfdb3b9d18ab90c61 (patch)
tree2c8ae1e650954dcc7342179a0e3202cd64fae8cf
parentKernel: Changed "ShouldWait" to return bool and "Acquire" to return void. (diff)
downloadyuzu-f09806aed24b2f7de7d969cbfdb3b9d18ab90c61.tar
yuzu-f09806aed24b2f7de7d969cbfdb3b9d18ab90c61.tar.gz
yuzu-f09806aed24b2f7de7d969cbfdb3b9d18ab90c61.tar.bz2
yuzu-f09806aed24b2f7de7d969cbfdb3b9d18ab90c61.tar.lz
yuzu-f09806aed24b2f7de7d969cbfdb3b9d18ab90c61.tar.xz
yuzu-f09806aed24b2f7de7d969cbfdb3b9d18ab90c61.tar.zst
yuzu-f09806aed24b2f7de7d969cbfdb3b9d18ab90c61.zip
-rw-r--r--src/core/hle/kernel/event.cpp2
-rw-r--r--src/core/hle/kernel/kernel.cpp2
-rw-r--r--src/core/hle/kernel/kernel.h8
-rw-r--r--src/core/hle/kernel/mutex.cpp2
-rw-r--r--src/core/hle/kernel/semaphore.cpp2
-rw-r--r--src/core/hle/kernel/thread.cpp2
-rw-r--r--src/core/hle/kernel/timer.cpp2
7 files changed, 10 insertions, 10 deletions
diff --git a/src/core/hle/kernel/event.cpp b/src/core/hle/kernel/event.cpp
index cdacba1d9..a48125965 100644
--- a/src/core/hle/kernel/event.cpp
+++ b/src/core/hle/kernel/event.cpp
@@ -47,7 +47,7 @@ ResultCode SignalEvent(const Handle handle) {
return InvalidHandle(ErrorModule::Kernel);
evt->signaled = true;
- evt->ReleaseAllWaitingThreads();
+ evt->WakeupAllWaitingThreads();
return RESULT_SUCCESS;
}
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index 692349857..d7fa4dcea 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -30,7 +30,7 @@ void WaitObject::RemoveWaitingThread(Thread* thread) {
waiting_threads.erase(itr);
}
-Thread* WaitObject::ReleaseNextThread() {
+Thread* WaitObject::WakeupNextThread() {
if (waiting_threads.empty())
return nullptr;
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h
index c26726223..3828efbea 100644
--- a/src/core/hle/kernel/kernel.h
+++ b/src/core/hle/kernel/kernel.h
@@ -138,13 +138,13 @@ public:
void RemoveWaitingThread(Thread* thead);
/**
- * Releases (and removes) the next thread waiting on this object
+ * Wake up the next thread waiting on this object
* @return Pointer to the thread that was resumed, nullptr if no threads are waiting
*/
- Thread* ReleaseNextThread();
+ Thread* WakeupNextThread();
- /// Releases all threads waiting on this object
- void ReleaseAllWaitingThreads();
+ /// Wake up all threads waiting on this object
+ void WakeupAllWaitingThreads();
private:
std::vector<Thread*> waiting_threads; ///< Threads waiting for this object to become available
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp
index 355824e60..c170e55ff 100644
--- a/src/core/hle/kernel/mutex.cpp
+++ b/src/core/hle/kernel/mutex.cpp
@@ -53,7 +53,7 @@ void MutexAcquireLock(Mutex* mutex, Handle thread = GetCurrentThread()->GetHandl
*/
void ResumeWaitingThread(Mutex* mutex) {
// Find the next waiting thread for the mutex...
- auto next_thread = mutex->ReleaseNextThread();
+ auto next_thread = mutex->WakeupNextThread();
if (next_thread != nullptr) {
MutexAcquireLock(mutex, next_thread->GetHandle());
} else {
diff --git a/src/core/hle/kernel/semaphore.cpp b/src/core/hle/kernel/semaphore.cpp
index 274680568..135d8fb2a 100644
--- a/src/core/hle/kernel/semaphore.cpp
+++ b/src/core/hle/kernel/semaphore.cpp
@@ -70,7 +70,7 @@ ResultCode ReleaseSemaphore(s32* count, Handle handle, s32 release_count) {
// Notify some of the threads that the semaphore has been released
// stop once the semaphore is full again or there are no more waiting threads
- while (!semaphore->ShouldWait() && semaphore->ReleaseNextThread() != nullptr) {
+ while (!semaphore->ShouldWait() && semaphore->WakeupNextThread() != nullptr) {
semaphore->Acquire();
}
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 7a7f430cf..ab1126a36 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -104,7 +104,7 @@ void Thread::Stop(const char* reason) {
ChangeReadyState(this, false);
status = THREADSTATUS_DORMANT;
- ReleaseAllWaitingThreads();
+ WakeupAllWaitingThreads();
// Stopped threads are never waiting.
wait_objects.clear();
diff --git a/src/core/hle/kernel/timer.cpp b/src/core/hle/kernel/timer.cpp
index 8d9db92a4..ec0b2c323 100644
--- a/src/core/hle/kernel/timer.cpp
+++ b/src/core/hle/kernel/timer.cpp
@@ -90,7 +90,7 @@ static void TimerCallback(u64 timer_handle, int cycles_late) {
timer->signaled = true;
// Resume all waiting threads
- timer->ReleaseAllWaitingThreads();
+ timer->WakeupAllWaitingThreads();
if (timer->reset_type == RESETTYPE_ONESHOT)
timer->signaled = false;