aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tsan/lit_tests/SharedLibs/load_shared_lib-so.cc
blob: d05aa6a40d18284fc863f2e77b832e16fb5b44c6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//===----------- load_shared_lib-so.cc --------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file is a part of ThreadSanitizer (TSan), a race detector.
//
//===----------------------------------------------------------------------===//

#include <stddef.h>

int GLOB_SHARED = 0;

extern "C"
void *write_from_so(void *unused) {
  GLOB_SHARED++;
  return NULL;
}