Module Name: src Committed By: martin Date: Thu Dec 14 17:49:40 UTC 2023
Modified Files: src/common/lib/libc/atomic [netbsd-10]: atomic_is_lock_free.c Log Message: Pull up following revision(s) (requested by rin in ticket #496): common/lib/libc/atomic/atomic_is_lock_free.c: revision 1.2 common/lib/libc/atomic/atomic_is_lock_free.c: revision 1.3 libc __atomic_is_lock_free: Fix clang build with symbol hacks. libc atomic: Make previous work a little less accidentally. To generate a diff of this commit: cvs rdiff -u -r1.3.2.2 -r1.3.2.3 \ src/common/lib/libc/atomic/atomic_is_lock_free.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/common/lib/libc/atomic/atomic_is_lock_free.c diff -u src/common/lib/libc/atomic/atomic_is_lock_free.c:1.3.2.2 src/common/lib/libc/atomic/atomic_is_lock_free.c:1.3.2.3 --- src/common/lib/libc/atomic/atomic_is_lock_free.c:1.3.2.2 Mon Jul 31 16:10:26 2023 +++ src/common/lib/libc/atomic/atomic_is_lock_free.c Thu Dec 14 17:49:40 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_is_lock_free.c,v 1.3.2.2 2023/07/31 16:10:26 martin Exp $ */ +/* $NetBSD: atomic_is_lock_free.c,v 1.3.2.3 2023/12/14 17:49:40 martin Exp $ */ /*- * Copyright (c) 2023 The NetBSD Foundation, Inc. @@ -27,12 +27,21 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: atomic_is_lock_free.c,v 1.3.2.2 2023/07/31 16:10:26 martin Exp $"); +__RCSID("$NetBSD: atomic_is_lock_free.c,v 1.3.2.3 2023/12/14 17:49:40 martin Exp $"); #include <sys/types.h> #include <sys/stdbool.h> +/* + * XXX Work around clang's built-in __atomic_is_lock_free by having the + * C name be different but using an asm rename to define the right + * symbol. + */ +bool __atomic_is_lock_free_hack(size_t, const volatile void *) + __RENAME(__atomic_is_lock_free); +#define __atomic_is_lock_free __atomic_is_lock_free_hack + bool __atomic_is_lock_free(size_t n, const volatile void *p __unused) {