summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulian Lettner <jlettner@apple.com>2019-04-05 02:05:57 +0000
committerJulian Lettner <jlettner@apple.com>2019-04-05 02:05:57 +0000
commit7d1ec7b07ee1494659ecdc519c18e8c53cabe189 (patch)
treea8cb09daf4778cce777bef73710db6a0127c38ef
parent5d289ed3fee3f2e0788d46a0537761686cb519b9 (diff)
downloadbcm5719-llvm-7d1ec7b07ee1494659ecdc519c18e8c53cabe189.tar.gz
bcm5719-llvm-7d1ec7b07ee1494659ecdc519c18e8c53cabe189.zip
[TSan][libdispatch] Make test work on Linux, pt. 2
llvm-svn: 357741
-rw-r--r--compiler-rt/test/tsan/libdispatch/dispatch_once_deadlock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/test/tsan/libdispatch/dispatch_once_deadlock.c b/compiler-rt/test/tsan/libdispatch/dispatch_once_deadlock.c
index 1e9e7d139f4..8379f81a910 100644
--- a/compiler-rt/test/tsan/libdispatch/dispatch_once_deadlock.c
+++ b/compiler-rt/test/tsan/libdispatch/dispatch_once_deadlock.c
@@ -28,8 +28,8 @@ int main() {
f();
- pthread_mutex_t mutex = {0};
- pthread_mutex_lock(&mutex);
+ pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+ pthread_mutex_unlock(&mutex); // Unlock of an unlocked mutex
fprintf(stderr, "g = %ld.\n", g);
fprintf(stderr, "h = %ld.\n", h);
OpenPOWER on IntegriCloud