NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-macppc/53380: undefined reference to `__atomic_fetch_add_8'

On Fri, Mar 22, 2019 at 05:20:01AM +0000, David H. Gutteridge wrote:
>  My understanding is GCC's libatomic must implement this in software,
>  since it isn't available as a hardware instruction. (This solution for
>  this specific PowerPC problem has been applied by other projects.) Do
>  you have an alternate suggestion to fix this? (A serious question, not
>  sarcasm.)

The problem is that there is no meaningfull way (at least in my view
of reality) to implement something like that in software. You can trick
around it (e.g. by using RAS on a single CPU machine), but then you
would be far better of not relying on atomics at all.

We had this discussion a few times for various architectures (like real
i386/i486 machines). Some software very stupidly relies on avaliable
atomic ops for sizes that just do not make any sense, and in general it
is better to fix the software.


Home | Main Index | Thread Index | Old Index