1 //===-- tsan_ignoreset.h ----------------------------------------*- C++ -*-===// 2 // 3 // This file is distributed under the University of Illinois Open Source 4 // License. See LICENSE.TXT for details. 5 // 6 //===----------------------------------------------------------------------===// 7 // 8 // This file is a part of ThreadSanitizer (TSan), a race detector. 9 // 10 // IgnoreSet holds a set of stack traces where ignores were enabled. 11 //===----------------------------------------------------------------------===// 12 #ifndef TSAN_IGNORESET_H 13 #define TSAN_IGNORESET_H 14 15 #include "tsan_defs.h" 16 17 namespace __tsan { 18 19 class IgnoreSet { 20 public: 21 static const uptr kMaxSize = 16; 22 23 IgnoreSet(); 24 void Add(u32 stack_id); 25 void Reset(); 26 uptr Size() const; 27 u32 At(uptr i) const; 28 29 private: 30 uptr size_; 31 u32 stacks_[kMaxSize]; 32 }; 33 34 } // namespace __tsan 35 36 #endif // TSAN_IGNORESET_H 37