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