Fix racy msan test

Summary:
Child thread may finish before pthread_setname_np() and/or
pthread_getname_np() had a chance to run, which causes these functions
to fail with ENOENT (meaning /proc/self/task/[tid]/comm doesn't exist).

Fix by stalling child thread on a mutex.

Reviewers: eugenis

Reviewed By: eugenis

Subscribers: llvm-commits, #sanitizers

Differential Revision: https://reviews.llvm.org/D43548

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@325703 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed