Only 64bit architectures can be supported this way, because libcxx defines __cxx_contention_t to be int64_t for FreeBSD, and 32bit arches do not have a kind of UMTX_OP_WAIT_INT64_PRIVATE operation.
Details
Details
- Reviewers
emaste arichardson Mordante ldionne - Group Reviewers
Restricted Project - Commits
- rG17ecbb3ea6ff: [libc++] [FreeBSD] only use _umtx_op(2) on 64bit arches
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Using __LP64__ means we won't use umtx for CHERI architectures. Can we change this to __SIZEOF_LONG__ == 8?
Comment Actions
Thanks for working on this!
libcxx/src/atomic.cpp | ||
---|---|---|
80–85 | Does this still work on FreeBSD platforms where __SIZEOF_LONG__ != 8 ? |
Comment Actions
This switches the __SIZEOF_LONG__ != 8 platforms back to the timed backoff fallback. This isn't great, but also relatively low priority, they're all Tier-2 platforms for us.
Comment Actions
Can you this information as comment in the code?
Otherwise LGTM from libc++'s perspective.
I assume you want to backport this to the release branch, right?
Does this still work on FreeBSD platforms where __SIZEOF_LONG__ != 8 ?