Path: blob/main/contrib/llvm-project/compiler-rt/lib/rtsan/rtsan_context.h
35233 views
//===--- rtsan_context.h - Realtime Sanitizer -------------------*- 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//===----------------------------------------------------------------------===//910#pragma once1112namespace __rtsan {1314class Context {15public:16Context();1718void RealtimePush();19void RealtimePop();2021void BypassPush();22void BypassPop();2324void ExpectNotRealtime(const char *intercepted_function_name);2526private:27bool InRealtimeContext() const;28bool IsBypassed() const;29void PrintDiagnostics(const char *intercepted_function_name);3031int realtime_depth{0};32int bypass_depth{0};33};3435Context &GetContextForThisThread();3637} // namespace __rtsan383940