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 toolchain/53051; it has been noted by GNATS.

From: coypu%sdf.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:19:09 +0000

 interesting thing, I couldn't find where it is defined for me.
 I am using this small file to test it out:
 
 int CRYPTO_atomic_add(long long int *val) {
 	if (__atomic_is_lock_free(sizeof(*val), val)) {
 		return 1;
 	} else {
 		return 0;
 	}
 }
 
 int main() {
 	long long int a=2;
 	return CRYPTO_atomic_add(&a);
 }
 
 
 and, on amd64, gcc -c test.c doesn't produce a reference to __atomic_is_lock_free.
 but if I am trying the vax cross compiler I have (gcc-trunk and netbsd),
 it does.
 
 
 Note atomic_is_lock_free is C11, though the GCC-provided stdatomic.h
 will map it to its internal function.
 


Home | Main Index | Thread Index | Old Index