Path: blob/main/contrib/llvm-project/compiler-rt/lib/rtsan/rtsan.h
35233 views
//===--- rtsan.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 once1112#include "sanitizer_common/sanitizer_internal_defs.h"1314extern "C" {1516namespace __rtsan {1718extern bool rtsan_initialized;19extern bool rtsan_init_is_running;2021} // namespace __rtsan2223// Initialise rtsan interceptors.24// A call to this method is added to the preinit array on Linux systems.25SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_init();2627// Enter real-time context.28// When in a real-time context, RTSan interceptors will error if realtime29// violations are detected. Calls to this method are injected at the code30// generation stage when RTSan is enabled.31SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_realtime_enter();3233// Exit the real-time context.34// When not in a real-time context, RTSan interceptors will simply forward35// intercepted method calls to the real methods.36SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_realtime_exit();3738// Disable all RTSan error reporting.39// Injected into the code if "nosanitize(realtime)" is on a function.40SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_off();4142// Re-enable all RTSan error reporting.43// The counterpart to `__rtsan_off`.44SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_on();4546} // extern "C"474849