Merge pull request #1695 from Subv/tls_alloc
Kernel/Threads: Dynamically allocate the TLS region for threads.
This commit is contained in:
commit
0d8bd3ba36
5 changed files with 74 additions and 28 deletions
|
@ -142,8 +142,11 @@ public:
|
|||
|
||||
MemoryRegionInfo* memory_region = nullptr;
|
||||
|
||||
/// Bitmask of the used TLS slots
|
||||
std::bitset<300> used_tls_slots;
|
||||
/// The Thread Local Storage area is allocated as processes create threads,
|
||||
/// each TLS area is 0x200 bytes, so one page (0x1000) is split up in 8 parts, and each part
|
||||
/// holds the TLS for a specific thread. This vector contains which parts are in use for each page as a bitmask.
|
||||
/// This vector will grow as more pages are allocated for new threads.
|
||||
std::vector<std::bitset<8>> tls_slots;
|
||||
|
||||
VAddr GetLinearHeapAreaAddress() const;
|
||||
VAddr GetLinearHeapBase() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue