]>
Commit | Line | Data |
---|---|---|
1a4d82fc | 1 | //===----------- load_shared_lib-so.cc --------------------------*- C++ -*-===// |
223e47cc LB |
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 | // | |
1a4d82fc | 10 | // This file is a part of ThreadSanitizer (TSan), a race detector. |
223e47cc LB |
11 | // |
12 | //===----------------------------------------------------------------------===// | |
13 | ||
1a4d82fc JJ |
14 | #include <stddef.h> |
15 | #include <unistd.h> | |
223e47cc | 16 | |
1a4d82fc | 17 | int GLOB_SHARED = 0; |
223e47cc | 18 | |
1a4d82fc JJ |
19 | extern "C" |
20 | void *write_from_so(void *unused) { | |
21 | if (unused) | |
22 | sleep(1); | |
23 | GLOB_SHARED++; | |
24 | return NULL; | |
223e47cc | 25 | } |