[libc-commits] [PATCH] D75818: [libc] Take 2: Add linux implementations of thrd_create and thrd_join functions.
Fangrui Song via Phabricator via libc-commits
libc-commits at lists.llvm.org
Sat Mar 7 21:32:05 PST 2020
MaskRay added a comment.
I think implementing pthread on top of C11 threads is plausible on Fuchsia because it just provides POSIX lite. However, the same idea copying over to Linux may not be practical. For one thing, the performance of `pthread_mutex_lock` matters. Implementing it on top of `mtx_lock` costs an extra function call, not to say that some features are not available in C11 mutex. `mtx_*` and `thrd_*` are usely so rarely in practice. Implementing them on top of pthread will have an infinitesimal cost.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the libc-commits