Hi Heather, On Tue, Oct 17, 2023 at 02:05:58PM -0500, Heather McIntyre wrote: > John and I discussed that atomic_compare_exchange_strong could have been > used here. I see that this has been pushed to the main branch, but I can > make the change to the atomic operation if you think that is a better > option.
It probably doesn't matter for this function since it isn't used often. I was just wondering whether you thought of using atomics here since there are really just two states here (__libelf_version == EV_NONE or __libelf_version == EV_CURRENT). I do have one question though. __libelf_version is checked in elf_begin. Should that check be guarded by a lock too? Thanks, Mark