Repository navigation
[libc] Clean up obsolete definitions in musl atomic_arch.h - #28217
Merged
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the atomic architecture definitions in system/lib/libc/musl/arch/emscripten/atomic_arch.h by renaming the a_clz_l and a_ctz_l macros to a_clz_32 and a_ctz_32 respectively. Additionally, it removes the unused a_store_l and a_cas_l inline functions and their associated macro definitions. There are no review comments, and we have no feedback to provide.
tlively
approved these changes
Nov 10, 2026
sbc100
force-pushed
the
musl-atomic-cleanup
branch
from
November 10, 2026 17:22
6dacd55 to
9aa5e5a
Compare
Collaborator
Author
|
I included a cleanup of atomic.h to remove all the default/fallback (so it obvious we don't use/need them) |
Member
|
Makes sense, LGTM. |
- Remove `a_store_l` and `a_cas_l`, which have been unused since the musl 1.1.15 update (emscripten-core#4813). - Replace `a_clz_l` and `a_ctz_l` with `a_clz_32` and `a_ctz_32` to match the arch hooks expected by musl's `src/internal/atomic.h` since the musl 1.2.2 update (emscripten-core#13006). Previously, `#define a_ctz_l __builtin_ctz` caused `atomic.h` to macro-expand its `a_ctz_l` wrapper definition into `static inline int __builtin_ctz(unsigned long x)` and fall back to the software `debruijn32` lookup table for `a_ctz_32`.
sbc100
force-pushed
the
musl-atomic-cleanup
branch
from
November 10, 2026 17:31
9aa5e5a to
a07462c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
a_store_landa_cas_l, which have been unused since the musl 1.1.15 update (Update musl to 1.1.15 #4813).a_clz_landa_ctz_lwitha_clz_32anda_ctz_32to match the arch hooks expected by musl'ssrc/internal/atomic.hsince the musl 1.2.2 update (Update musl to v1.2.2 #13006). Previously,#define a_ctz_l __builtin_ctzcausedatomic.hto macro-expand itsa_ctz_lwrapper definition intostatic inline int __builtin_ctz(unsigned long x)and fall back to the softwaredebruijn32lookup table fora_ctz_32.