Public headers: use SPDX identifiers
[userspace-rcu.git] / include / urcu / uatomic / generic.h
index 5bb0d4f983c3b96c920827b991b6798fadc5cbbd..a03015897baa6fe980c36b03da95d181b4d93fc0 100644 (file)
@@ -1,22 +1,15 @@
+// SPDX-FileCopyrightText: 1991-1994 by Xerox Corporation.  All rights reserved.
+// SPDX-FileCopyrightText: 1996-1999 by Silicon Graphics.  All rights reserved.
+// SPDX-FileCopyrightText: 1999-2004 Hewlett-Packard Development Company, L.P.
+// SPDX-FileCopyrightText: 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+// SPDX-FileCopyrightText: 2010 Paolo Bonzini
+//
+// SPDX-License-Identifier: LicenseRef-Boehm-GC
+
 #ifndef _URCU_UATOMIC_GENERIC_H
 #define _URCU_UATOMIC_GENERIC_H
 
 /*
- * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
- * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
- * Copyright (c) 1999-2004 Hewlett-Packard Development Company, L.P.
- * Copyright (c) 2009      Mathieu Desnoyers
- * Copyright (c) 2010      Paolo Bonzini
- *
- * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
- * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
- *
- * Permission is hereby granted to use or copy this program
- * for any purpose,  provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
  * Code inspired from libuatomic_ops-1.2, inherited in part from the
  * Boehm-Demers-Weiser conservative garbage collector.
  */
@@ -38,19 +31,23 @@ extern "C" {
 #endif
 
 #if !defined __OPTIMIZE__  || defined UATOMIC_NO_LINK_ERROR
+#ifdef ILLEGAL_INSTR
 static inline __attribute__((always_inline))
 void _uatomic_link_error(void)
 {
-#ifdef ILLEGAL_INSTR
        /*
         * generate an illegal instruction. Cannot catch this with
         * linker tricks when optimizations are disabled.
         */
        __asm__ __volatile__(ILLEGAL_INSTR);
+}
 #else
+static inline __attribute__((always_inline, __noreturn__))
+void _uatomic_link_error(void)
+{
        __builtin_trap();
-#endif
 }
+#endif
 
 #else /* #if !defined __OPTIMIZE__  || defined UATOMIC_NO_LINK_ERROR */
 extern void _uatomic_link_error(void);
This page took 0.028648 seconds and 4 git commands to generate.