annotate libsanitizer/tsan/tsan_ignoreset.h @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 //===-- tsan_ignoreset.h ----------------------------------------*- C++ -*-===//
kono
parents:
diff changeset
2 //
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
4 // See https://llvm.org/LICENSE.txt for license information.
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
111
kono
parents:
diff changeset
6 //
kono
parents:
diff changeset
7 //===----------------------------------------------------------------------===//
kono
parents:
diff changeset
8 //
kono
parents:
diff changeset
9 // This file is a part of ThreadSanitizer (TSan), a race detector.
kono
parents:
diff changeset
10 //
kono
parents:
diff changeset
11 // IgnoreSet holds a set of stack traces where ignores were enabled.
kono
parents:
diff changeset
12 //===----------------------------------------------------------------------===//
kono
parents:
diff changeset
13 #ifndef TSAN_IGNORESET_H
kono
parents:
diff changeset
14 #define TSAN_IGNORESET_H
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 #include "tsan_defs.h"
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 namespace __tsan {
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 class IgnoreSet {
kono
parents:
diff changeset
21 public:
kono
parents:
diff changeset
22 static const uptr kMaxSize = 16;
kono
parents:
diff changeset
23
kono
parents:
diff changeset
24 IgnoreSet();
kono
parents:
diff changeset
25 void Add(u32 stack_id);
kono
parents:
diff changeset
26 void Reset();
kono
parents:
diff changeset
27 uptr Size() const;
kono
parents:
diff changeset
28 u32 At(uptr i) const;
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 private:
kono
parents:
diff changeset
31 uptr size_;
kono
parents:
diff changeset
32 u32 stacks_[kMaxSize];
kono
parents:
diff changeset
33 };
kono
parents:
diff changeset
34
kono
parents:
diff changeset
35 } // namespace __tsan
kono
parents:
diff changeset
36
kono
parents:
diff changeset
37 #endif // TSAN_IGNORESET_H