diff options
| author | 2018-11-19 18:40:02 -0800 | |
|---|---|---|
| committer | 2018-11-19 18:40:02 -0800 | |
| commit | 2caac4a395a9c98cf1b9edee1457a88c04fc5045 (patch) | |
| tree | 01e29da6e94c76109225ae27ed92dbfe7973c22d /src/core/hle/kernel/svc.cpp | |
| parent | Merge pull request #1634 from DarkLordZach/better-hid-2 (diff) | |
| parent | kernel/resource_limit: Clean up interface (diff) | |
| download | yuzu-2caac4a395a9c98cf1b9edee1457a88c04fc5045.tar.gz yuzu-2caac4a395a9c98cf1b9edee1457a88c04fc5045.tar.xz yuzu-2caac4a395a9c98cf1b9edee1457a88c04fc5045.zip | |
Merge pull request #1738 from lioncash/res-limit
kernel/resource_limit: Clean up interface
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 75dbfc31d..9904605cd 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -736,13 +736,6 @@ static ResultCode SetThreadPriority(Handle handle, u32 priority) { | |||
| 736 | 736 | ||
| 737 | const auto* const current_process = Core::CurrentProcess(); | 737 | const auto* const current_process = Core::CurrentProcess(); |
| 738 | 738 | ||
| 739 | // Note: The kernel uses the current process's resource limit instead of | ||
| 740 | // the one from the thread owner's resource limit. | ||
| 741 | const ResourceLimit& resource_limit = current_process->GetResourceLimit(); | ||
| 742 | if (resource_limit.GetMaxResourceValue(ResourceType::Priority) > priority) { | ||
| 743 | return ERR_INVALID_THREAD_PRIORITY; | ||
| 744 | } | ||
| 745 | |||
| 746 | SharedPtr<Thread> thread = current_process->GetHandleTable().Get<Thread>(handle); | 739 | SharedPtr<Thread> thread = current_process->GetHandleTable().Get<Thread>(handle); |
| 747 | if (!thread) { | 740 | if (!thread) { |
| 748 | return ERR_INVALID_HANDLE; | 741 | return ERR_INVALID_HANDLE; |
| @@ -885,10 +878,6 @@ static ResultCode CreateThread(Handle* out_handle, VAddr entry_point, u64 arg, V | |||
| 885 | } | 878 | } |
| 886 | 879 | ||
| 887 | auto* const current_process = Core::CurrentProcess(); | 880 | auto* const current_process = Core::CurrentProcess(); |
| 888 | const ResourceLimit& resource_limit = current_process->GetResourceLimit(); | ||
| 889 | if (resource_limit.GetMaxResourceValue(ResourceType::Priority) > priority) { | ||
| 890 | return ERR_INVALID_THREAD_PRIORITY; | ||
| 891 | } | ||
| 892 | 881 | ||
| 893 | if (processor_id == THREADPROCESSORID_DEFAULT) { | 882 | if (processor_id == THREADPROCESSORID_DEFAULT) { |
| 894 | // Set the target CPU to the one specified in the process' exheader. | 883 | // Set the target CPU to the one specified in the process' exheader. |