xref: /netbsd-src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_suppressions.h (revision f14316bcbc544b96a93e884bc5c2b15fd60e22ae)
1 //===-- tsan_suppressions.h -------------------------------------*- C++ -*-===//
2 //
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
5 //
6 //===----------------------------------------------------------------------===//
7 //
8 // This file is a part of ThreadSanitizer (TSan), a race detector.
9 //
10 //===----------------------------------------------------------------------===//
11 #ifndef TSAN_SUPPRESSIONS_H
12 #define TSAN_SUPPRESSIONS_H
13 
14 #include "tsan_report.h"
15 
16 namespace __tsan {
17 
18 void InitializeSuppressions();
19 void FinalizeSuppressions();
20 uptr IsSuppressed(ReportType typ, const ReportStack *stack);
21 
22 // Exposed for testing.
23 enum SuppressionType {
24   SuppressionRace,
25   SuppressionMutex,
26   SuppressionThread,
27   SuppressionSignal
28 };
29 
30 struct Suppression {
31   Suppression *next;
32   SuppressionType type;
33   char *templ;
34 };
35 
36 Suppression *SuppressionParse(Suppression *head, const char* supp);
37 bool SuppressionMatch(char *templ, const char *str);
38 
39 }  // namespace __tsan
40 
41 #endif  // TSAN_SUPPRESSIONS_H
42