[NFC][compiler-rt][hwasan] Re-use ring buffer size calculation

Users can call HwasanThreadList::GetRingBufferSize rather than RingBufferSize
to prevent having to do the calculation in RingBufferSize. This will be useful
for Fuchsia where we plan to initialize the stack ring buffer separately from
the rest of thread initialization.

Differential Revision: https://reviews.llvm.org/D104823
This commit is contained in:
Leonard Chan 2021-06-23 16:12:52 -07:00
parent d4dcb55c70
commit 8e74668e96
1 changed files with 2 additions and 0 deletions

View File

@ -171,6 +171,8 @@ class HwasanThreadList {
return stats_;
}
uptr GetRingBufferSize() const { return ring_buffer_size_; }
private:
Thread *AllocThread() {
SpinMutexLock l(&free_space_mutex_);