diff options
| author | 2018-09-12 12:14:51 -0400 | |
|---|---|---|
| committer | 2018-09-12 12:14:51 -0400 | |
| commit | 79217f9870ae0145cb504d61b506de84289eb95c (patch) | |
| tree | 5004204f7d7a6841ff4a208a1ae86b4d43430180 /src/core/hle/kernel/svc.cpp | |
| parent | Merge pull request #1304 from lioncash/str (diff) | |
| parent | svc: Return ERR_INVALID_PROCESSOR_ID in CreateThread() if an invalid processo... (diff) | |
| download | yuzu-79217f9870ae0145cb504d61b506de84289eb95c.tar.gz yuzu-79217f9870ae0145cb504d61b506de84289eb95c.tar.xz yuzu-79217f9870ae0145cb504d61b506de84289eb95c.zip | |
Merge pull request #1303 from lioncash/error
kernel/errors: Amend invalid thread priority and invalid processor ID error codes
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 0b2a7e3cb..f500fd2e7 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -382,7 +382,7 @@ static ResultCode GetThreadPriority(u32* priority, Handle handle) { | |||
| 382 | /// Sets the priority for the specified thread | 382 | /// Sets the priority for the specified thread |
| 383 | static ResultCode SetThreadPriority(Handle handle, u32 priority) { | 383 | static ResultCode SetThreadPriority(Handle handle, u32 priority) { |
| 384 | if (priority > THREADPRIO_LOWEST) { | 384 | if (priority > THREADPRIO_LOWEST) { |
| 385 | return ERR_OUT_OF_RANGE; | 385 | return ERR_INVALID_THREAD_PRIORITY; |
| 386 | } | 386 | } |
| 387 | 387 | ||
| 388 | auto& kernel = Core::System::GetInstance().Kernel(); | 388 | auto& kernel = Core::System::GetInstance().Kernel(); |
| @@ -527,7 +527,7 @@ static ResultCode CreateThread(Handle* out_handle, VAddr entry_point, u64 arg, V | |||
| 527 | std::string name = fmt::format("unknown-{:X}", entry_point); | 527 | std::string name = fmt::format("unknown-{:X}", entry_point); |
| 528 | 528 | ||
| 529 | if (priority > THREADPRIO_LOWEST) { | 529 | if (priority > THREADPRIO_LOWEST) { |
| 530 | return ERR_OUT_OF_RANGE; | 530 | return ERR_INVALID_THREAD_PRIORITY; |
| 531 | } | 531 | } |
| 532 | 532 | ||
| 533 | SharedPtr<ResourceLimit>& resource_limit = Core::CurrentProcess()->resource_limit; | 533 | SharedPtr<ResourceLimit>& resource_limit = Core::CurrentProcess()->resource_limit; |
| @@ -548,8 +548,8 @@ static ResultCode CreateThread(Handle* out_handle, VAddr entry_point, u64 arg, V | |||
| 548 | case THREADPROCESSORID_3: | 548 | case THREADPROCESSORID_3: |
| 549 | break; | 549 | break; |
| 550 | default: | 550 | default: |
| 551 | ASSERT_MSG(false, "Unsupported thread processor ID: {}", processor_id); | 551 | LOG_ERROR(Kernel_SVC, "Invalid thread processor ID: {}", processor_id); |
| 552 | break; | 552 | return ERR_INVALID_PROCESSOR_ID; |
| 553 | } | 553 | } |
| 554 | 554 | ||
| 555 | auto& kernel = Core::System::GetInstance().Kernel(); | 555 | auto& kernel = Core::System::GetInstance().Kernel(); |