diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 6 | ||||
| -rw-r--r-- | src/core/hle/kernel/thread.h | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 11f7d2127..6ebc8c151 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -534,6 +534,12 @@ s32 Thread::GetWaitObjectIndex(WaitObject* object) const { | |||
| 534 | return static_cast<s32>(std::distance(match, wait_objects.rend()) - 1); | 534 | return static_cast<s32>(std::distance(match, wait_objects.rend()) - 1); |
| 535 | } | 535 | } |
| 536 | 536 | ||
| 537 | VAddr Thread::GetCommandBufferAddress() const { | ||
| 538 | // Offset from the start of TLS at which the IPC command buffer begins. | ||
| 539 | static constexpr int CommandHeaderOffset = 0x80; | ||
| 540 | return GetTLSAddress() + CommandHeaderOffset; | ||
| 541 | } | ||
| 542 | |||
| 537 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 543 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 538 | 544 | ||
| 539 | void ThreadingInit() { | 545 | void ThreadingInit() { |
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index f02e1d43a..520ac22c2 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h | |||
| @@ -159,6 +159,12 @@ public: | |||
| 159 | return tls_address; | 159 | return tls_address; |
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | /* | ||
| 163 | * Returns the address of the current thread's command buffer, located in the TLS. | ||
| 164 | * @returns VAddr of the thread's command buffer. | ||
| 165 | */ | ||
| 166 | VAddr GetCommandBufferAddress() const; | ||
| 167 | |||
| 162 | /** | 168 | /** |
| 163 | * Returns whether this thread is waiting for all the objects in | 169 | * Returns whether this thread is waiting for all the objects in |
| 164 | * its wait list to become ready, as a result of a WaitSynchronizationN call | 170 | * its wait list to become ready, as a result of a WaitSynchronizationN call |