diff options
| author | 2014-11-30 08:41:49 -0500 | |
|---|---|---|
| committer | 2014-11-30 08:41:49 -0500 | |
| commit | a5afad09378dab8978e8e4149337aebf70891668 (patch) | |
| tree | 8affb19959e7b78fdb0b1aea80569b2ba30b1863 /src | |
| parent | Merge pull request #228 from linkmauve/glfw-error (diff) | |
| parent | Thread: Check that thread is actually in "wait state" when verifying wait. (diff) | |
| download | yuzu-a5afad09378dab8978e8e4149337aebf70891668.tar.gz yuzu-a5afad09378dab8978e8e4149337aebf70891668.tar.xz yuzu-a5afad09378dab8978e8e4149337aebf70891668.zip | |
Merge pull request #226 from bunnei/svc-and-thread-fixes
Svc and thread fixes
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/svc.cpp | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index f3f54a4e9..f59795901 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -143,7 +143,7 @@ void ChangeReadyState(Thread* t, bool ready) { | |||
| 143 | /// Verify that a thread has not been released from waiting | 143 | /// Verify that a thread has not been released from waiting |
| 144 | inline bool VerifyWait(const Thread* thread, WaitType type, Handle wait_handle) { | 144 | inline bool VerifyWait(const Thread* thread, WaitType type, Handle wait_handle) { |
| 145 | _dbg_assert_(KERNEL, thread != nullptr); | 145 | _dbg_assert_(KERNEL, thread != nullptr); |
| 146 | return type == thread->wait_type && wait_handle == thread->wait_handle; | 146 | return (type == thread->wait_type) && (wait_handle == thread->wait_handle) && (thread->IsWaiting()); |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | /// Stops the current thread | 149 | /// Stops the current thread |
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 87d768856..43a3cbe03 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp | |||
| @@ -189,6 +189,8 @@ static Result CreateAddressArbiter(u32* arbiter) { | |||
| 189 | 189 | ||
| 190 | /// Arbitrate address | 190 | /// Arbitrate address |
| 191 | static Result ArbitrateAddress(Handle arbiter, u32 address, u32 type, u32 value, s64 nanoseconds) { | 191 | static Result ArbitrateAddress(Handle arbiter, u32 address, u32 type, u32 value, s64 nanoseconds) { |
| 192 | DEBUG_LOG(SVC, "called handle=0x%08X, address=0x%08X, type=0x%08X, value=0x%08X", arbiter, | ||
| 193 | address, type, value); | ||
| 192 | return Kernel::ArbitrateAddress(arbiter, static_cast<Kernel::ArbitrationType>(type), | 194 | return Kernel::ArbitrateAddress(arbiter, static_cast<Kernel::ArbitrationType>(type), |
| 193 | address, value).raw; | 195 | address, value).raw; |
| 194 | } | 196 | } |
| @@ -331,6 +333,9 @@ static Result ClearEvent(Handle evt) { | |||
| 331 | /// Sleep the current thread | 333 | /// Sleep the current thread |
| 332 | static void SleepThread(s64 nanoseconds) { | 334 | static void SleepThread(s64 nanoseconds) { |
| 333 | DEBUG_LOG(SVC, "called nanoseconds=%lld", nanoseconds); | 335 | DEBUG_LOG(SVC, "called nanoseconds=%lld", nanoseconds); |
| 336 | |||
| 337 | // Check for next thread to schedule | ||
| 338 | HLE::Reschedule(__func__); | ||
| 334 | } | 339 | } |
| 335 | 340 | ||
| 336 | /// This returns the total CPU ticks elapsed since the CPU was powered-on | 341 | /// This returns the total CPU ticks elapsed since the CPU was powered-on |