tech-userlevel archive

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

Re: PATCH libatomic

On Fri, May 08, 2020 at 01:51:16AM +0200, Kamil Rytarowski wrote:
> A runtime detection could be a part of ifunc (is it ready for NetBSD?).
> The standard C/C++ feature is to detect whether atomic operations are
> real (lock-free) through atomic_is_lock_free(). This is a feature, not a
> bug (as claimed by some people). atomic_is_lock_free() can be overloaded
> in libatomic and detect CPU type in runtime and redirect either to real
> CPU intrinsic of lock-free fallback.

Not without performance penalty for every atomic operation, unless you propose
to do this by binary patch as is done in the kernel.


Home | Main Index | Thread Index | Old Index