1 //===----------- load_shared_lib-so.cc --------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // This file is a part of ThreadSanitizer (TSan), a race detector. 11 // 12 //===----------------------------------------------------------------------===// 13 14 #include <stddef.h> 15 16 int GLOB_SHARED = 0; 17 18 extern "C" 19 void *write_from_so(void *unused) { 20 GLOB_SHARED++; 21 return NULL; 22 } 23