tsan_interface_ann.h 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. //===-- tsan_interface_ann.h ------------------------------------*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // This file is a part of ThreadSanitizer (TSan), a race detector.
  10. //
  11. // Interface for dynamic annotations.
  12. //===----------------------------------------------------------------------===//
  13. #ifndef TSAN_INTERFACE_ANN_H
  14. #define TSAN_INTERFACE_ANN_H
  15. #include <sanitizer_common/sanitizer_internal_defs.h>
  16. // This header should NOT include any other headers.
  17. // All functions in this header are extern "C" and start with __tsan_.
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. SANITIZER_INTERFACE_ATTRIBUTE void __tsan_acquire(void *addr);
  22. SANITIZER_INTERFACE_ATTRIBUTE void __tsan_release(void *addr);
  23. #ifdef __cplusplus
  24. } // extern "C"
  25. #endif
  26. #endif // TSAN_INTERFACE_ANN_H