mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:57:44 +00:00
UserspaceEmulator: Add TLS regions to reachability checking
This commit is contained in:
parent
1dcc21d32e
commit
c13da77e85
2 changed files with 22 additions and 8 deletions
|
@ -98,7 +98,18 @@ public:
|
|||
|
||||
SharedBufferRegion* shbuf_region(int shbuf_id);
|
||||
|
||||
NonnullOwnPtrVector<Region>& regions() { return m_regions; }
|
||||
template<typename Callback>
|
||||
void for_each_region(Callback callback)
|
||||
{
|
||||
if (m_tls_region) {
|
||||
if (callback(*m_tls_region) == IterationDecision::Break)
|
||||
return;
|
||||
}
|
||||
for (auto& region : m_regions) {
|
||||
if (callback(region) == IterationDecision::Break)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
OwnPtr<Region> m_tls_region;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue