summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2015-05-21 02:51:34 +0200
committerYuri Kunde Schlesner <yuriks@yuriks.net>2015-05-21 02:51:34 +0200
commit1b7596e779b00f2309a05bf12afc4695dd64e27b (patch)
treef796aa2c461375435080c7a4068d68d7ebd60bad /src/core/hle/kernel
parentMerge pull request #783 from jroweboy/cond-wait (diff)
parenty2r_u: Stub StartConversion to prevent moflex games from hanging. (diff)
downloadyuzu-1b7596e779b00f2309a05bf12afc4695dd64e27b.tar
yuzu-1b7596e779b00f2309a05bf12afc4695dd64e27b.tar.gz
yuzu-1b7596e779b00f2309a05bf12afc4695dd64e27b.tar.bz2
yuzu-1b7596e779b00f2309a05bf12afc4695dd64e27b.tar.lz
yuzu-1b7596e779b00f2309a05bf12afc4695dd64e27b.tar.xz
yuzu-1b7596e779b00f2309a05bf12afc4695dd64e27b.tar.zst
yuzu-1b7596e779b00f2309a05bf12afc4695dd64e27b.zip
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/address_arbiter.cpp3
-rw-r--r--src/core/hle/kernel/event.cpp3
-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.cpp6
-rw-r--r--src/core/hle/kernel/timer.cpp4
6 files changed, 20 insertions, 0 deletions
diff --git a/src/core/hle/kernel/address_arbiter.cpp b/src/core/hle/kernel/address_arbiter.cpp
index a1221766e..195286422 100644
--- a/src/core/hle/kernel/address_arbiter.cpp
+++ b/src/core/hle/kernel/address_arbiter.cpp
@@ -79,6 +79,9 @@ ResultCode AddressArbiter::ArbitrateAddress(ArbitrationType type, VAddr address,
LOG_ERROR(Kernel, "unknown type=%d", type);
return ResultCode(ErrorDescription::InvalidEnumValue, ErrorModule::Kernel, ErrorSummary::WrongArgument, ErrorLevel::Usage);
}
+
+ HLE::Reschedule(__func__);
+
return RESULT_SUCCESS;
}
diff --git a/src/core/hle/kernel/event.cpp b/src/core/hle/kernel/event.cpp
index f338f3266..e45deb1c6 100644
--- a/src/core/hle/kernel/event.cpp
+++ b/src/core/hle/kernel/event.cpp
@@ -41,7 +41,10 @@ void Event::Acquire() {
void Event::Signal() {
signaled = true;
+
WakeupAllWaitingThreads();
+
+ HLE::Reschedule(__func__);
}
void Event::Clear() {
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp
index f530217fd..6aa73df86 100644
--- a/src/core/hle/kernel/mutex.cpp
+++ b/src/core/hle/kernel/mutex.cpp
@@ -94,6 +94,8 @@ void Mutex::Release() {
ResumeWaitingThread(this);
}
}
+
+ HLE::Reschedule(__func__);
}
} // namespace
diff --git a/src/core/hle/kernel/semaphore.cpp b/src/core/hle/kernel/semaphore.cpp
index 5d6543ef4..dbb4c9b7f 100644
--- a/src/core/hle/kernel/semaphore.cpp
+++ b/src/core/hle/kernel/semaphore.cpp
@@ -54,6 +54,8 @@ ResultVal<s32> Semaphore::Release(s32 release_count) {
Acquire();
}
+ HLE::Reschedule(__func__);
+
return MakeResult<s32>(previous_count);
}
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index a5f1904d7..690d33b55 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -109,6 +109,8 @@ void Thread::Stop() {
}
Kernel::g_current_process->used_tls_slots[tls_index] = false;
+
+ HLE::Reschedule(__func__);
}
Thread* ArbitrateHighestPriorityThread(u32 address) {
@@ -232,6 +234,8 @@ static Thread* PopNextReadyThread() {
void WaitCurrentThread_Sleep() {
Thread* thread = GetCurrentThread();
thread->status = THREADSTATUS_WAIT_SLEEP;
+
+ HLE::Reschedule(__func__);
}
void WaitCurrentThread_WaitSynchronization(std::vector<SharedPtr<WaitObject>> wait_objects, bool wait_set_output, bool wait_all) {
@@ -431,6 +435,8 @@ ResultVal<SharedPtr<Thread>> Thread::Create(std::string name, VAddr entry_point,
ready_queue.push_back(thread->current_priority, thread.get());
thread->status = THREADSTATUS_READY;
+ HLE::Reschedule(__func__);
+
return MakeResult<SharedPtr<Thread>>(std::move(thread));
}
diff --git a/src/core/hle/kernel/timer.cpp b/src/core/hle/kernel/timer.cpp
index e69fece65..25d066bf1 100644
--- a/src/core/hle/kernel/timer.cpp
+++ b/src/core/hle/kernel/timer.cpp
@@ -52,10 +52,14 @@ void Timer::Set(s64 initial, s64 interval) {
u64 initial_microseconds = initial / 1000;
CoreTiming::ScheduleEvent(usToCycles(initial_microseconds),
timer_callback_event_type, callback_handle);
+
+ HLE::Reschedule(__func__);
}
void Timer::Cancel() {
CoreTiming::UnscheduleEvent(timer_callback_event_type, callback_handle);
+
+ HLE::Reschedule(__func__);
}
void Timer::Clear() {