summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2020-06-18 18:15:19 -0400
committerGravatar Fernando Sahmkow2020-06-27 11:36:25 -0400
commit22ceaca2f415b962416637db9fff9782575746ce (patch)
tree1c111e7c2ab438868fb9fb1aa506c0515a9199af /src/core/hle/kernel/svc.cpp
parentArmDynarmic32: Setup CNTPCT correctly (diff)
downloadyuzu-22ceaca2f415b962416637db9fff9782575746ce.tar.gz
yuzu-22ceaca2f415b962416637db9fff9782575746ce.tar.xz
yuzu-22ceaca2f415b962416637db9fff9782575746ce.zip
SVC: Add GetThreadPriority32 & SetThreadPriority32
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r--src/core/hle/kernel/svc.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 013ae9e34..5674d9558 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -1135,6 +1135,10 @@ static ResultCode SetThreadPriority(Core::System& system, Handle handle, u32 pri
1135 return RESULT_SUCCESS; 1135 return RESULT_SUCCESS;
1136} 1136}
1137 1137
1138static ResultCode SetThreadPriority32(Core::System& system, Handle handle, u32 priority) {
1139 return SetThreadPriority(system, handle, priority);
1140}
1141
1138/// Get which CPU core is executing the current thread 1142/// Get which CPU core is executing the current thread
1139static u32 GetCurrentProcessorNumber(Core::System& system) { 1143static u32 GetCurrentProcessorNumber(Core::System& system) {
1140 LOG_TRACE(Kernel_SVC, "called"); 1144 LOG_TRACE(Kernel_SVC, "called");
@@ -1933,6 +1937,12 @@ static ResultCode SetThreadCoreMask(Core::System& system, Handle thread_handle,
1933 return thread->SetCoreAndAffinityMask(core, affinity_mask); 1937 return thread->SetCoreAndAffinityMask(core, affinity_mask);
1934} 1938}
1935 1939
1940static ResultCode SetThreadCoreMask32(Core::System& system, Handle thread_handle, u32 core,
1941 u32 affinity_mask_low, u32 affinity_mask_high) {
1942 const u64 affinity_mask = static_cast<u64>(affinity_mask_low) | (static_cast<u64>(affinity_mask_high) << 32);
1943 return SetThreadCoreMask(system, thread_handle, core, affinity_mask);
1944}
1945
1936static ResultCode CreateEvent(Core::System& system, Handle* write_handle, Handle* read_handle) { 1946static ResultCode CreateEvent(Core::System& system, Handle* write_handle, Handle* read_handle) {
1937 LOG_DEBUG(Kernel_SVC, "called"); 1947 LOG_DEBUG(Kernel_SVC, "called");
1938 1948
@@ -2206,9 +2216,9 @@ static const FunctionDef SVC_Table_32[] = {
2206 {0x0a, nullptr, "ExitThread32"}, 2216 {0x0a, nullptr, "ExitThread32"},
2207 {0x0b, nullptr, "SleepThread32"}, 2217 {0x0b, nullptr, "SleepThread32"},
2208 {0x0c, SvcWrap32<GetThreadPriority32>, "GetThreadPriority32"}, 2218 {0x0c, SvcWrap32<GetThreadPriority32>, "GetThreadPriority32"},
2209 {0x0d, nullptr, "SetThreadPriority32"}, 2219 {0x0d, SvcWrap32<SetThreadPriority32>, "SetThreadPriority32"},
2210 {0x0e, nullptr, "GetThreadCoreMask32"}, 2220 {0x0e, nullptr, "GetThreadCoreMask32"},
2211 {0x0f, nullptr, "SetThreadCoreMask32"}, 2221 {0x0f, SvcWrap32<SetThreadCoreMask32>, "SetThreadCoreMask32"},
2212 {0x10, nullptr, "GetCurrentProcessorNumber32"}, 2222 {0x10, nullptr, "GetCurrentProcessorNumber32"},
2213 {0x11, nullptr, "SignalEvent32"}, 2223 {0x11, nullptr, "SignalEvent32"},
2214 {0x12, nullptr, "ClearEvent32"}, 2224 {0x12, nullptr, "ClearEvent32"},