tech-userlevel archive

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

PATCH libatomic

Lack of libatomic is increasingly hard to deal with. This library
implements function calls for atomic operations.

Personally I stopped testing sanitizers year ago as they required
libatomic. We want libatomic for LLDB in base. Rewritting everything to
stop using libatomic is no viable as this is a standard C11/C++14 feature.

Workaround to enforce newest CPU models does not work as a general
solution (unless we want to drop all ports except recent x86_64 and
perhaps recent aarch64).

Analogous situation is in FreeBSD, but they have a workaround with
enforcing GCC libatomic when needed. There is no workaround for NetBSD.

+ other "duplicates"

I propose the following patch:

Based on:

Local changes:
 - ported to NetBSD
 - switched to C11 stdatomic.h and fixed compatibility with GCC
 - added __atomic_fetch_nand_##n functions
 - fixed __atomic_compare_exchange_##n

Attachment: signature.asc
Description: OpenPGP digital signature

Home | Main Index | Thread Index | Old Index