diff options
| author | 2016-05-12 21:51:35 -0400 | |
|---|---|---|
| committer | 2016-05-12 21:51:35 -0400 | |
| commit | 0d8bd3ba369a4a6264ba99a66dbc17e1e14e1440 (patch) | |
| tree | c7341fcf893002e87fbe18b0a04b221aff46bf13 /src/core/hle/kernel/process.h | |
| parent | Merge pull request #1783 from JayFoxRox/cleanup-shadersetup (diff) | |
| parent | Kernel/Threads: Dynamically allocate the TLS region for threads in the BASE r... (diff) | |
| download | yuzu-0d8bd3ba369a4a6264ba99a66dbc17e1e14e1440.tar.gz yuzu-0d8bd3ba369a4a6264ba99a66dbc17e1e14e1440.tar.xz yuzu-0d8bd3ba369a4a6264ba99a66dbc17e1e14e1440.zip | |
Merge pull request #1695 from Subv/tls_alloc
Kernel/Threads: Dynamically allocate the TLS region for threads.
Diffstat (limited to 'src/core/hle/kernel/process.h')
| -rw-r--r-- | src/core/hle/kernel/process.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/hle/kernel/process.h b/src/core/hle/kernel/process.h index a06afef2b..d781ef32c 100644 --- a/src/core/hle/kernel/process.h +++ b/src/core/hle/kernel/process.h | |||
| @@ -142,8 +142,11 @@ public: | |||
| 142 | 142 | ||
| 143 | MemoryRegionInfo* memory_region = nullptr; | 143 | MemoryRegionInfo* memory_region = nullptr; |
| 144 | 144 | ||
| 145 | /// Bitmask of the used TLS slots | 145 | /// The Thread Local Storage area is allocated as processes create threads, |
| 146 | std::bitset<300> used_tls_slots; | 146 | /// each TLS area is 0x200 bytes, so one page (0x1000) is split up in 8 parts, and each part |
| 147 | /// holds the TLS for a specific thread. This vector contains which parts are in use for each page as a bitmask. | ||
| 148 | /// This vector will grow as more pages are allocated for new threads. | ||
| 149 | std::vector<std::bitset<8>> tls_slots; | ||
| 147 | 150 | ||
| 148 | VAddr GetLinearHeapAreaAddress() const; | 151 | VAddr GetLinearHeapAreaAddress() const; |
| 149 | VAddr GetLinearHeapBase() const; | 152 | VAddr GetLinearHeapBase() const; |