llvm/compiler-rt/lib/sanitizer_common/sanitizer_thread_safety.h

//===-- sanitizer_thread_safety.h -------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file is shared between sanitizer tools.
//
// Wrappers around thread safety annotations.
// https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
//===----------------------------------------------------------------------===//

#ifndef SANITIZER_THREAD_SAFETY_H
#define SANITIZER_THREAD_SAFETY_H

#if defined(__clang__)
#define SANITIZER_THREAD_ANNOTATION(x)
#else
#define SANITIZER_THREAD_ANNOTATION
#endif

#define SANITIZER_MUTEX
#define SANITIZER_SCOPED_LOCK
#define SANITIZER_GUARDED_BY(x)
#define SANITIZER_PT_GUARDED_BY(x)
#define SANITIZER_REQUIRES(...)
#define SANITIZER_REQUIRES_SHARED(...)
#define SANITIZER_ACQUIRE(...)
#define SANITIZER_ACQUIRE_SHARED(...)
#define SANITIZER_TRY_ACQUIRE(...)
#define SANITIZER_RELEASE(...)
#define SANITIZER_RELEASE_SHARED(...)
#define SANITIZER_EXCLUDES(...)
#define SANITIZER_CHECK_LOCKED(...)
#define SANITIZER_NO_THREAD_SAFETY_ANALYSIS

#endif