aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorSebastian Valle <subv2112@gmail.com>2017-10-01 14:44:06 -0500
committerGitHub <noreply@github.com>2017-10-01 14:44:06 -0500
commitcbf57de4e5620cd2f579bee08aa2c54e757150ee (patch)
tree3b1828171d76559199dd4871b721795b67d7747e /src/core/hle/kernel/thread.cpp
parentfd974cb5027db7bf1186b1778b6af8ed23c1eaef (diff)
parent1265575db59f1f3389cc447cd771d560c48374f4 (diff)
Merge pull request #2971 from Subv/per_process_memops
Memory: Add overloads for ReadBlock and WriteBlock that operate on a specific process.
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r--src/core/hle/kernel/thread.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 2614a260ce..0f7970ebee 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -541,6 +541,12 @@ s32 Thread::GetWaitObjectIndex(WaitObject* object) const {
return static_cast<s32>(std::distance(match, wait_objects.rend()) - 1);
}
+VAddr Thread::GetCommandBufferAddress() const {
+ // Offset from the start of TLS at which the IPC command buffer begins.
+ static constexpr int CommandHeaderOffset = 0x80;
+ return GetTLSAddress() + CommandHeaderOffset;
+}
+
////////////////////////////////////////////////////////////////////////////////////////////////////
void ThreadingInit() {