summaryrefslogtreecommitdiff
path: root/libsanitizer/tsan/tsan_ignoreset.h
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2013-12-05 09:18:38 +0000
committerKostya Serebryany <kcc@gcc.gnu.org>2013-12-05 09:18:38 +0000
commitdf77f0e4ec043bc4fa155efbd5c1c74ce73d2b50 (patch)
tree20d85354103063e38b162a6a90b7ae51fb4b6104 /libsanitizer/tsan/tsan_ignoreset.h
parent649d196dbd78a119786f204d36b7c5d4dcb3a949 (diff)
downloadgcc-df77f0e4ec043bc4fa155efbd5c1c74ce73d2b50.tar.gz
libsanitizer merge from upstream r196090
From-SVN: r205695
Diffstat (limited to 'libsanitizer/tsan/tsan_ignoreset.h')
-rw-r--r--libsanitizer/tsan/tsan_ignoreset.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/libsanitizer/tsan/tsan_ignoreset.h b/libsanitizer/tsan/tsan_ignoreset.h
new file mode 100644
index 00000000000..5a250b75af5
--- /dev/null
+++ b/libsanitizer/tsan/tsan_ignoreset.h
@@ -0,0 +1,36 @@
+//===-- tsan_ignoreset.h ----------------------------------------*- C++ -*-===//
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of ThreadSanitizer (TSan), a race detector.
+//
+// IgnoreSet holds a set of stack traces where ignores were enabled.
+//===----------------------------------------------------------------------===//
+#ifndef TSAN_IGNORESET_H
+#define TSAN_IGNORESET_H
+
+#include "tsan_defs.h"
+
+namespace __tsan {
+
+class IgnoreSet {
+ public:
+ static const uptr kMaxSize = 16;
+
+ IgnoreSet();
+ void Add(u32 stack_id);
+ void Reset();
+ uptr Size() const;
+ u32 At(uptr i) const;
+
+ private:
+ uptr size_;
+ u32 stacks_[kMaxSize];
+};
+
+} // namespace __tsan
+
+#endif // TSAN_IGNORESET_H