// constructors of the binary which are called after constructors of shared
// library.
+#include <sanitizer/tsan_interface.h>
#include <stdio.h>
#if BUILD_SO
// RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
+#include <sanitizer/tsan_interface.h>
#include <stdio.h>
namespace __tsan {
// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
#include <pthread.h>
+#include <sanitizer/tsan_interface.h>
#include <stdio.h>
#if (__APPLE__)
// RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
#include "java.h"
#include <memory.h>
+#include <sanitizer/tsan_interface.h>
#if (__APPLE__)
__attribute__((weak)) // Required for dyld macOS 12.0+
// RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
#include "java.h"
#include <memory.h>
+#include <sanitizer/tsan_interface.h>
#if (__APPLE__)
__attribute__((weak)) // Required for dyld macOS 12.0+