NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: toolchain/53051: __atomic_is_lock_free missing on NetBSD/sparc
The following reply was made to PR lib/53051; it has been noted by GNATS.
From: David Young <dyoung%pobox.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: toolchain/53051: __atomic_is_lock_free missing on NetBSD/sparc
Date: Sat, 24 Feb 2018 15:37:03 -0600
On Sat, Feb 24, 2018 at 08:50:01PM +0000, maya%netbsd.org@localhost wrote:
> The following reply was made to PR toolchain/53051; it has been noted by GNATS.
>
> From: maya%netbsd.org@localhost
> To: gnats-bugs%NetBSD.org@localhost
> Cc:
> Subject: Re: toolchain/53051: __atomic_is_lock_free missing on NetBSD/sparc
> Date: Sat, 24 Feb 2018 20:47:46 +0000
>
> Never mind, the documentation even says it out loud (thanks for someone
> who read it out for me... :-))
>
> This built-in function returns true if objects of SIZE bytes always
> generate lock-free atomic instructions for the target
> architecture. If the built-in function is not known to be
> lock-free, a call is made to a runtime routine named
> `__atomic_is_lock_free'.
That paragraph may oversimplify things a bit? What if an object
is SIZE bytes but not naturally aligned?
Some readers may misunderstand "lock-free" to mean a non-interlocked
memory access (i.e., without LOCK prefix on x86) such as the
atomic_*_ni(3) functions provide on NetBSD, when the meaning is more
like a mutex, unless *I* have misunderstood.
Dave
--
David Young
dyoung%pobox.com@localhost Urbana, IL (217) 721-9981
Home |
Main Index |
Thread Index |
Old Index