X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=include%2Furcu%2Farch%2Faarch64.h;h=f573306a05450d80c7b4548852f7bfa50f03daf3;hb=HEAD;hp=d6a133758dffca0c22ca5f6e94314c4c6d0d5390;hpb=6893800a4d1cc14dff0395ddcd660a5138db183d;p=urcu.git diff --git a/include/urcu/arch/aarch64.h b/include/urcu/arch/aarch64.h index d6a1337..f573306 100644 --- a/include/urcu/arch/aarch64.h +++ b/include/urcu/arch/aarch64.h @@ -1,25 +1,13 @@ +// SPDX-FileCopyrightText: 2010 Paul E. McKenney, IBM Corporation. +// SPDX-FileCopyrightText: 2009-2015 Mathieu Desnoyers +// +// SPDX-License-Identifier: LGPL-2.1-or-later + #ifndef _URCU_ARCH_AARCH64_H #define _URCU_ARCH_AARCH64_H /* * arch/aarch64.h: definitions for aarch64 architecture - * - * Copyright (c) 2010 Paul E. McKenney, IBM Corporation. - * Copyright (c) 2009-2015 Mathieu Desnoyers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include @@ -42,6 +30,25 @@ extern "C" { #define __NR_membarrier 283 #endif +/* + * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63293 + * + * Backported in RHEL7 gcc 4.8.5-11 + */ +#if defined(URCU_GCC_VERSION) && defined(__GNUC_RH_RELEASE__) +# if (URCU_GCC_VERSION == 40805) && (__GNUC_RH_RELEASE__ >= 11) +# define URCU_GCC_PATCHED_63293 +# endif +#endif + +#ifdef URCU_GCC_VERSION +# if URCU_GCC_VERSION < 50100 && !defined(URCU_GCC_PATCHED_63293) +# error Your gcc version performs unsafe access to deallocated stack +# endif +#endif + +#define caa_cpu_relax() __asm__ __volatile__ ("yield" : : : "memory") + #ifdef __cplusplus } #endif