summaryrefslogtreecommitdiff
path: root/test/tsan/thread_exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/tsan/thread_exit.c')
-rw-r--r--test/tsan/thread_exit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/tsan/thread_exit.c b/test/tsan/thread_exit.c
index 214b022b6..097ae9aed 100644
--- a/test/tsan/thread_exit.c
+++ b/test/tsan/thread_exit.c
@@ -1,17 +1,21 @@
-// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
+// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1
+// | FileCheck %s
#include "test.h"
int var;
void *Thread(void *x) {
+ fprintf(stderr, "Thread\n");
pthread_exit(&var);
return 0;
}
int main() {
+ fprintf(stderr, "MAIN\n");
pthread_t t;
pthread_create(&t, 0, Thread, 0);
void *retval = 0;
+ fprintf(stderr, "JOIN\n");
pthread_join(t, &retval);
if (retval != &var) {
fprintf(stderr, "Unexpected return value\n");