Hi RZ Pan,

I'll start working on the atomic store/exchange stuff. It shouldn't be
too difficult to add since it will have similar masking logic to
atomic fetch.

Also - I briefly looked and couldn't find the place where those macro's
values for RISC-V are defined in GCC. If anyone can point me in the
right direction for that, I would appreciate it :)

Thank you,
Patrick

On 4/7/22 19:48, Pan RZ wrote:
Hi Patrick,

Glad to know that efforts have been made to add inlining subword atomic supports into gcc. The patch looks great so far, yet as Andreas Schwab has pointed out (at riscv-collab/riscv-gcc#337), looks like it only contains atomic fetch stuff. Just wondering do you have further plans to implement support for atomic store / exchange as well? Also, as a reminder, note that after adding store / exchange supports, some related macros like ATOMIC_BOOL_LOCK_FREE and ATOMIC_CHAR_LOCK_FREE's values (defined in <atomic>) may need to be set to true. Currently in RISC-V gcc, they are all defined as false. This may also need to be done for std::atomic<bool>::is_always_lock_free and std::atomic_is_lock_free(bool_var).

See:https://en.cppreference.com/w/cpp/atomic/atomic_is_lock_free and
https://github.com/riscv-collab/riscv-gcc/issues/337#issuecomment-1086664815
What's your opinion on this?

Best regards, RZ Pan (XieJiSS)

Reply via email to