1 //===-- tsan_ignoreset.h ----------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file is a part of ThreadSanitizer (TSan), a race detector.
10 //
11 // IgnoreSet holds a set of stack traces where ignores were enabled.
12 //===----------------------------------------------------------------------===//
13 #ifndef TSAN_IGNORESET_H
14 #define TSAN_IGNORESET_H
15 
16 #include "tsan_defs.h"
17 
18 namespace __tsan {
19 
20 class IgnoreSet {
21  public:
22   static const uptr kMaxSize = 16;
23 
24   IgnoreSet();
25   void Add(u32 stack_id);
26   void Reset();
27   uptr Size() const;
28   u32 At(uptr i) const;
29 
30  private:
31   uptr size_;
32   u32 stacks_[kMaxSize];
33 };
34 
35 }  // namespace __tsan
36 
37 #endif  // TSAN_IGNORESET_H
38