Re: libatomic vs. __atomic_test_and_set()

2025-07-08 Thread Sebastian Huber
Hello, I am not sure how this should be fixed. For example, clang generates for the test case a call to __atomic_exchange_1(): https://godbolt.org/z/EY49jPs78 >From my point of view it makes more sense, if the compiler generates calls to >_1, _2, ... variants. GCC does it for atomic_uint_leas

Re: libatomic vs. __atomic_test_and_set()

2025-07-02 Thread Sebastian Huber
Hello, it seems that the variants without a _1, _2, ... are explicitly provided (libatomic_i.h): /* And the generic sized versions. */ void libat_load (size_t, void *, void *, int) MAN(load); void libat_store (size_t, void *, void *, int) MAN(store); void libat_exchange (size_t, void *, void *,