summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/svc/svc_processor.cpp
diff options
context:
space:
mode:
authorMai <mai.iam2048@gmail.com>2023-02-05 08:26:52 +0100
committerGitHub <noreply@github.com>2023-02-05 08:26:52 +0100
commit037300014385d7dd25029d7aac188f325f1e5bc3 (patch)
treebe79f36453a4735088d9230e02f426792077eeb4 /src/core/hle/kernel/svc/svc_processor.cpp
parentMerge pull request #9720 from SoRadGaming/discordPresenceUpdate (diff)
parentkernel/svc: Split implementations into separate files (diff)
downloadyuzu-037300014385d7dd25029d7aac188f325f1e5bc3.tar
yuzu-037300014385d7dd25029d7aac188f325f1e5bc3.tar.gz
yuzu-037300014385d7dd25029d7aac188f325f1e5bc3.tar.bz2
yuzu-037300014385d7dd25029d7aac188f325f1e5bc3.tar.lz
yuzu-037300014385d7dd25029d7aac188f325f1e5bc3.tar.xz
yuzu-037300014385d7dd25029d7aac188f325f1e5bc3.tar.zst
yuzu-037300014385d7dd25029d7aac188f325f1e5bc3.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/svc/svc_processor.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/core/hle/kernel/svc/svc_processor.cpp b/src/core/hle/kernel/svc/svc_processor.cpp
new file mode 100644
index 000000000..8561cf74f
--- /dev/null
+++ b/src/core/hle/kernel/svc/svc_processor.cpp
@@ -0,0 +1,21 @@
+// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "common/logging/log.h"
+#include "core/core.h"
+#include "core/hle/kernel/physical_core.h"
+#include "core/hle/kernel/svc.h"
+
+namespace Kernel::Svc {
+
+/// Get which CPU core is executing the current thread
+u32 GetCurrentProcessorNumber(Core::System& system) {
+ LOG_TRACE(Kernel_SVC, "called");
+ return static_cast<u32>(system.CurrentPhysicalCore().CoreIndex());
+}
+
+u32 GetCurrentProcessorNumber32(Core::System& system) {
+ return GetCurrentProcessorNumber(system);
+}
+
+} // namespace Kernel::Svc