diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index fdf9f9011..9050ff3de 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -726,16 +726,31 @@ static ResultCode CreateTransferMemory(Handle* handle, VAddr addr, u64 size, u32 | |||
| 726 | return RESULT_SUCCESS; | 726 | return RESULT_SUCCESS; |
| 727 | } | 727 | } |
| 728 | 728 | ||
| 729 | static ResultCode GetThreadCoreMask(Handle handle, u32* mask, u64* unknown) { | 729 | static ResultCode GetThreadCoreMask(Handle thread_handle, u32* core, u64* mask) { |
| 730 | NGLOG_WARNING(Kernel_SVC, "(STUBBED) called, handle=0x{:08X}", handle); | 730 | NGLOG_TRACE(Kernel_SVC, "called, handle=0x{:08X}", thread_handle); |
| 731 | *mask = 0x0; | 731 | |
| 732 | *unknown = 0xf; | 732 | const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle); |
| 733 | if (!thread) { | ||
| 734 | return ERR_INVALID_HANDLE; | ||
| 735 | } | ||
| 736 | |||
| 737 | *core = thread->ideal_core; | ||
| 738 | *mask = thread->mask; | ||
| 739 | |||
| 733 | return RESULT_SUCCESS; | 740 | return RESULT_SUCCESS; |
| 734 | } | 741 | } |
| 735 | 742 | ||
| 736 | static ResultCode SetThreadCoreMask(Handle handle, u32 mask, u64 unknown) { | 743 | static ResultCode SetThreadCoreMask(Handle thread_handle, u32 core, u64 mask) { |
| 737 | NGLOG_WARNING(Kernel_SVC, "(STUBBED) called, handle=0x{:08X}, mask=0x{:08X}, unknown=0x{:X}", | 744 | NGLOG_TRACE(Kernel_SVC, "called, handle=0x{:08X}, mask=0x{:08X}, core=0x{:X}", thread_handle, |
| 738 | handle, mask, unknown); | 745 | mask, core); |
| 746 | |||
| 747 | const SharedPtr<Thread> thread = g_handle_table.Get<Thread>(thread_handle); | ||
| 748 | if (!thread) { | ||
| 749 | return ERR_INVALID_HANDLE; | ||
| 750 | } | ||
| 751 | |||
| 752 | thread->ChangeCore(core, mask); | ||
| 753 | |||
| 739 | return RESULT_SUCCESS; | 754 | return RESULT_SUCCESS; |
| 740 | } | 755 | } |
| 741 | 756 | ||