diff options
author | bunnei <bunneidev@gmail.com> | 2016-05-08 21:03:08 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2016-05-08 21:03:08 +0200 |
commit | 282a2ad539223d61067a1957fab8c45571075987 (patch) | |
tree | 1adb819b34340de4395ada46ac6b089cdf121b4a /src/core/hle | |
parent | Merge pull request #1718 from alex-laties/fixup-type-conversions (diff) | |
parent | Kernel/Threading: Warn when a thread can be scheduled in the Syscore (Core 1). (diff) | |
download | yuzu-282a2ad539223d61067a1957fab8c45571075987.tar yuzu-282a2ad539223d61067a1957fab8c45571075987.tar.gz yuzu-282a2ad539223d61067a1957fab8c45571075987.tar.bz2 yuzu-282a2ad539223d61067a1957fab8c45571075987.tar.lz yuzu-282a2ad539223d61067a1957fab8c45571075987.tar.xz yuzu-282a2ad539223d61067a1957fab8c45571075987.tar.zst yuzu-282a2ad539223d61067a1957fab8c45571075987.zip |
Diffstat (limited to 'src/core/hle')
-rw-r--r-- | src/core/hle/kernel/process.h | 2 | ||||
-rw-r--r-- | src/core/hle/svc.cpp | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h index 6d2ca96a2..a06afef2b 100644 --- a/src/core/hle/kernel/process.h +++ b/src/core/hle/kernel/process.h @@ -107,6 +107,8 @@ public: ProcessFlags flags; /// Kernel compatibility version for this process u16 kernel_version = 0; + /// The default CPU for this process, threads are scheduled on this cpu by default. + u8 ideal_processor = 0; /// The id of this process u32 process_id = next_process_id++; diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index fb2aecbf2..60c8747f3 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp @@ -496,6 +496,11 @@ static ResultCode CreateThread(Handle* out_handle, s32 priority, u32 entry_point break; } + if (processor_id == THREADPROCESSORID_1 || processor_id == THREADPROCESSORID_ALL || + (processor_id == THREADPROCESSORID_DEFAULT && Kernel::g_current_process->ideal_processor == THREADPROCESSORID_1)) { + LOG_WARNING(Kernel_SVC, "Newly created thread is allowed to be run in the SysCore, unimplemented."); + } + CASCADE_RESULT(SharedPtr<Thread> thread, Kernel::Thread::Create( name, entry_point, priority, arg, processor_id, stack_top)); CASCADE_RESULT(*out_handle, Kernel::g_handle_table.Create(std::move(thread))); |