forked from OSchip/llvm-project
[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:
parent
d4dcb55c70
commit
8e74668e96
|
@ -171,6 +171,8 @@ class HwasanThreadList {
|
|||
return stats_;
|
||||
}
|
||||
|
||||
uptr GetRingBufferSize() const { return ring_buffer_size_; }
|
||||
|
||||
private:
|
||||
Thread *AllocThread() {
|
||||
SpinMutexLock l(&free_space_mutex_);
|
||||
|
|
Loading…
Reference in New Issue