fjricci added a comment. Uploaded a pthreads implementation which makes this patch unnecessary in https://reviews.llvm.org/D29993, https://reviews.llvm.org/D29994, https://reviews.llvm.org/D29995 https://reviews.llvm.org/D29787