diff options
| author | 2021-01-01 02:06:06 -0800 | |
|---|---|---|
| committer | 2021-01-28 21:42:25 -0800 | |
| commit | 1e55498110800623c63e3ef03bfbff6b6de1c522 (patch) | |
| tree | 77437e33162d077c3aa86204b4f47a11d7769a42 /src/core/hle/kernel/svc.cpp | |
| parent | hle: kernel: KThread: Fix ThreadType definition. (diff) | |
| download | yuzu-1e55498110800623c63e3ef03bfbff6b6de1c522.tar.gz yuzu-1e55498110800623c63e3ef03bfbff6b6de1c522.tar.xz yuzu-1e55498110800623c63e3ef03bfbff6b6de1c522.zip | |
hle: kernel: KThread: Reorganize thread priority defaults.
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 711b9d520..70a8ef34b 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -1130,11 +1130,9 @@ static ResultCode GetThreadPriority32(Core::System& system, u32* priority, Handl | |||
| 1130 | static ResultCode SetThreadPriority(Core::System& system, Handle handle, u32 priority) { | 1130 | static ResultCode SetThreadPriority(Core::System& system, Handle handle, u32 priority) { |
| 1131 | LOG_TRACE(Kernel_SVC, "called"); | 1131 | LOG_TRACE(Kernel_SVC, "called"); |
| 1132 | 1132 | ||
| 1133 | if (priority > THREADPRIO_LOWEST) { | 1133 | if (priority > Svc::LowestThreadPriority) { |
| 1134 | LOG_ERROR( | 1134 | LOG_ERROR(Kernel_SVC, "An invalid priority was specified {} for thread_handle={:08X}", |
| 1135 | Kernel_SVC, | 1135 | priority, handle); |
| 1136 | "An invalid priority was specified, expected {} but got {} for thread_handle={:08X}", | ||
| 1137 | THREADPRIO_LOWEST, priority, handle); | ||
| 1138 | return ERR_INVALID_THREAD_PRIORITY; | 1136 | return ERR_INVALID_THREAD_PRIORITY; |
| 1139 | } | 1137 | } |
| 1140 | 1138 | ||
| @@ -1472,7 +1470,7 @@ static ResultCode CreateThread(Core::System& system, Handle* out_handle, VAddr e | |||
| 1472 | return ERR_INVALID_PROCESSOR_ID; | 1470 | return ERR_INVALID_PROCESSOR_ID; |
| 1473 | } | 1471 | } |
| 1474 | 1472 | ||
| 1475 | if (priority > THREADPRIO_LOWEST) { | 1473 | if (priority > Svc::LowestThreadPriority) { |
| 1476 | LOG_ERROR(Kernel_SVC, | 1474 | LOG_ERROR(Kernel_SVC, |
| 1477 | "Invalid thread priority specified ({}). Must be within the range 0-64", | 1475 | "Invalid thread priority specified ({}). Must be within the range 0-64", |
| 1478 | priority); | 1476 | priority); |