llvm/compiler-rt/lib/scudo/standalone/thread_annotations.h

//===-- thread_annotations.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
//
//===----------------------------------------------------------------------===//

#ifndef SCUDO_THREAD_ANNOTATIONS_
#define SCUDO_THREAD_ANNOTATIONS_

// Enable thread safety attributes only with clang.
// The attributes can be safely ignored when compiling with other compilers.
#if defined(__clang__)
#define THREAD_ANNOTATION_ATTRIBUTE_(x)
#else
#define THREAD_ANNOTATION_ATTRIBUTE_
#endif

#define CAPABILITY(x)

#define SCOPED_CAPABILITY

#define GUARDED_BY(x)

#define PT_GUARDED_BY(x)

#define ACQUIRED_BEFORE(...)

#define ACQUIRED_AFTER(...)

#define REQUIRES(...)

#define REQUIRES_SHARED(...)

#define ACQUIRE(...)

#define ACQUIRE_SHARED(...)

#define RELEASE(...)

#define RELEASE_SHARED(...)

#define TRY_ACQUIRE(...)

#define TRY_ACQUIRE_SHARED(...)

#define EXCLUDES(...)

#define ASSERT_CAPABILITY(x)

#define ASSERT_SHARED_CAPABILITY(x)

#define RETURN_CAPABILITY(x)

#define NO_THREAD_SAFETY_ANALYSIS

#endif // SCUDO_THREAD_ANNOTATIONS_