Path: blob/main/contrib/llvm-project/compiler-rt/lib/tsan/rtl/tsan_ignoreset.h
35269 views
//===-- tsan_ignoreset.h ----------------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file is a part of ThreadSanitizer (TSan), a race detector.9//10// IgnoreSet holds a set of stack traces where ignores were enabled.11//===----------------------------------------------------------------------===//12#ifndef TSAN_IGNORESET_H13#define TSAN_IGNORESET_H1415#include "tsan_defs.h"1617namespace __tsan {1819class IgnoreSet {20public:21IgnoreSet();22void Add(StackID stack_id);23void Reset() { size_ = 0; }24uptr Size() const { return size_; }25StackID At(uptr i) const;2627private:28static constexpr uptr kMaxSize = 16;29uptr size_;30StackID stacks_[kMaxSize];31};3233} // namespace __tsan3435#endif // TSAN_IGNORESET_H363738