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: Joerg Sonnenberger <joerg%bec.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: lib-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
	netbsd-bugs%netbsd.org@localhost, martin%NetBSD.org@localhost
Subject: Re: toolchain/53051: __atomic_is_lock_free missing on NetBSD/sparc
Date: Sat, 24 Feb 2018 23:02:00 +0100

 On Sat, Feb 24, 2018 at 09:40:00PM +0000, David Young wrote:
 >  >  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?
 
 The function is only for use with declared atomic storage. That includes
 correct alignment (which is not necessarily the natural alignment).
 
 Joerg
 


Home | Main Index | Thread Index | Old Index