Fixes https://llvm.org/bugs/show_bug.cgi?id=23235 If pthread_create is followed by pthread_detach, the new thread may not acquire synchronize with the parent thread. llvm-svn: 235293