summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorGravatar Sebastian Valle2017-10-01 14:44:06 -0500
committerGravatar GitHub2017-10-01 14:44:06 -0500
commit30fabc41c60b08af20b6eaf719d012b7480d7123 (patch)
tree3b1828171d76559199dd4871b721795b67d7747e /src/core/hle/kernel
parentMerge pull request #2974 from Subv/nim_event (diff)
parentMemory: Make WriteBlock take a Process parameter on which to operate (diff)
downloadyuzu-30fabc41c60b08af20b6eaf719d012b7480d7123.tar.gz
yuzu-30fabc41c60b08af20b6eaf719d012b7480d7123.tar.xz
yuzu-30fabc41c60b08af20b6eaf719d012b7480d7123.zip
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')
-rw-r--r--src/core/hle/kernel/thread.cpp6
-rw-r--r--src/core/hle/kernel/thread.h6
2 files changed, 12 insertions, 0 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 2614a260c..0f7970ebe 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 {
541 return static_cast<s32>(std::distance(match, wait_objects.rend()) - 1); 541 return static_cast<s32>(std::distance(match, wait_objects.rend()) - 1);
542} 542}
543 543
544VAddr Thread::GetCommandBufferAddress() const {
545 // Offset from the start of TLS at which the IPC command buffer begins.
546 static constexpr int CommandHeaderOffset = 0x80;
547 return GetTLSAddress() + CommandHeaderOffset;
548}
549
544//////////////////////////////////////////////////////////////////////////////////////////////////// 550////////////////////////////////////////////////////////////////////////////////////////////////////
545 551
546void ThreadingInit() { 552void ThreadingInit() {
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h
index 4679c2022..314fba81f 100644
--- a/src/core/hle/kernel/thread.h
+++ b/src/core/hle/kernel/thread.h
@@ -164,6 +164,12 @@ public:
164 return tls_address; 164 return tls_address;
165 } 165 }
166 166
167 /*
168 * Returns the address of the current thread's command buffer, located in the TLS.
169 * @returns VAddr of the thread's command buffer.
170 */
171 VAddr GetCommandBufferAddress() const;
172
167 /** 173 /**
168 * Returns whether this thread is waiting for all the objects in 174 * Returns whether this thread is waiting for all the objects in
169 * its wait list to become ready, as a result of a WaitSynchronizationN call 175 * its wait list to become ready, as a result of a WaitSynchronizationN call