1139823Simp//===-- tsan_ignoreset.h ----------------------------------------*- C++ -*-===//
2122922Sandre//
3122922Sandre//                     The LLVM Compiler Infrastructure
4122922Sandre//
5122922Sandre// This file is distributed under the University of Illinois Open Source
6122922Sandre// License. See LICENSE.TXT for details.
7122922Sandre//
8122922Sandre//===----------------------------------------------------------------------===//
9122922Sandre//
10122922Sandre// This file is a part of ThreadSanitizer (TSan), a race detector.
11122922Sandre//
12122922Sandre// IgnoreSet holds a set of stack traces where ignores were enabled.
13122922Sandre//===----------------------------------------------------------------------===//
14122922Sandre#ifndef TSAN_IGNORESET_H
15122922Sandre#define TSAN_IGNORESET_H
16122922Sandre
17122922Sandre#include "tsan_defs.h"
18122922Sandre
19122922Sandrenamespace __tsan {
20122922Sandre
21122922Sandreclass IgnoreSet {
22122922Sandre public:
23122922Sandre  static const uptr kMaxSize = 16;
24122922Sandre
25122922Sandre  IgnoreSet();
26122922Sandre  void Add(u32 stack_id);
27122922Sandre  void Reset();
28122922Sandre  uptr Size() const;
29122922Sandre  u32 At(uptr i) const;
30122922Sandre
31170030Srwatson private:
32170030Srwatson  uptr size_;
33170030Srwatson  u32 stacks_[kMaxSize];
34170030Srwatson};
35170030Srwatson
36170030Srwatson}  // namespace __tsan
37170030Srwatson
38122922Sandre#endif  // TSAN_IGNORESET_H
39170030Srwatson