[libc-commits] [PATCH] D121334: [libc] Use the constexpr constructor to initialize exit handlers mutex.
Michael Jones via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Mar 9 14:13:56 PST 2022
michaelrj added inline comments.
================
Comment at: libc/src/stdlib/atexit.cpp:18
-mtx_t lock;
-// TODO need an easier way to use mtx_t internally, or use pthread_mutex_t
-// with PTHREAD_MUTEX_INITIALIZER when it lands.
-struct Init {
- Init() { __llvm_libc::mtx_init(&lock, mtx_plain); }
-} init;
+Mutex handler_list_mtx(false, false, false);
----------------
this seems like it won't work if `linux/mutex.h` isn't included, should this be locked down by host OS?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121334/new/
https://reviews.llvm.org/D121334
More information about the libc-commits
mailing list